When you're watching a live match, your device tries to render the outcome of the match based on the troops AI and deployments as its data being sent bit by bit by supercell server.
A replay plays from the complete data fully sent from the server, thus the most accurate rendering of how the actual attack went.