Simple, the hardware can do it better. While we don't really notice much now, this was a big issue in the past, and has been continued to advance for reasons of energy efficiency and quality, but hardware codecs do it better.
Hardware Codecs Advantages:
1. Use less power than CPU using software codec
2. Create higher quality image and audio
3. Complete the work faster, resulting in smoother play back
Software Codec Advantages:
1. Can be changed and updated.