Answer
When a boxer hits his opponent or the heavy bag, the opponent or bag supplies much of the impulse that stops his oncoming hand.
When sparring, and when a boxer misses his punch, he must supply the effort to stop his moving hand, which is tiring.
Incidentally, there is also more footwork to perform, and mental energy that must be expended while sparring, compared to when hitting a stationary punching bag.