According to StVO § 23 para. 1 applies: "(1) A person who drives a vehicle is responsible for ensuring that his or her vision and hearing are not affected by the occupancy, animals, cargo, equipment or condition of the vehicle. (...)"
Too loud noises of the exhaust can drown out warning signals and cause you to react to them late.
That's why you should always have the radio set so loud that you can still perceive from the outside incoming acoustic warning signals.
The wearing of headphones while driving is not explicitly forbidden, but your hearing is thereby impaired, which is again prohibited by StVO.