As
@boXem said bandwidth is not necessarily related to the output filter though it may be part of what limits bandwidth.
Modern class D designs provide very wide internal bandwidth and much higher loop gain than typical (most, probably all) class A or AB designs. That is the reason for their lower distortion, lower output impedance (higher damping factor), and so forth. The output filter to reduce switching noise is above the audio band and included in the feedback loop so not a direct contributor to bandwidth, which is determined by loop gain and thus primarily (IMO) noise, distortion, and stability criteria. Like any other amplifier, bandwidth is a design choice, and likely driven by marketing since bigger numbers are often perceived as better. With class D switching speeds running in the 500 kHz range, bandwidth well beyond the audio band is easily achieved, and 50~100 kHz is way beyond what we can hear and/or want to send to any speaker. Without class D's high loop gain and internal bandwidth, class A and AB designs typically require greater bandwidth to achieve the same distortion and flatness specs to 20 kHz, making their greater bandwidth a limitation and not a feature.
From a design and use point of view, excessive bandwidth is not usually a good thing. Higher bandwidth means greater noise, more issues with stability, more power needed (wasted) to support the wider bandwidth, greater potential for sending ultrasonic signals to the speakers (goodbye tweeters), and so forth.
Wide bandwidth can reduce high-frequency roll-off in the audio band, but whether the amp is -0.01 dB or -0.1 dB at 20 kHz, it is going to be inaudible. It can also reduce phase shift at very high frequencies, but again that is almost certainly inaudible, and both roll-off and phase shift in an actual system is so far dominated by the speakers that the amplifier is inconsequential.