Rising impedance with frequency is caused by inductance. This is no surprise because class D amps drive the load through an inductor, typically also in parallel with a capacitor. This makes a second order low pass filter to remove the ultrasonics.
Class D amps generate ultrasonics because of how they operate. Instead of having the output of the transistor chase the audio waveform, instead it turns the transistor fully on and fully off and varies the length of each pulse with how high the voltage of the wavefront should be. Transistors are very efficient at 0% and 100% power, so there is a huge power efficiency gain from this.
There are two problems the filter fixes:
1. The FCC problem. In class D, the audio frequency is modulated over a much higher frequency carrier wave. This frequency is typically 300-600 khz. The output of the amp is connected to several feet of speaker cable. This can accidentally make the amp into a 100 watt radio transmitter at the carrier frequency which can disrupt cell phone, short wave or AM radio signals.
2. The tweeter heater problem. Some speakers dont have an inductor in series with the tweeter and can have low inductance tweeters. You can end up with the tweeter’s thin voice coil burning several watts.
The answer to both is the same. The filter on most class D amps reduces the carrier frequency by about a factor of 1000x.
It is true that class D amplifier products generate electromagnetic noise due to PWM. Noise radiates electromagnetic waves of noise components to the surroundings through speaker cables. A low-pass filter is attached to the output to prevent it. However, even with a filter, it is not possible to completely prevent leaks. Therefore, in each country, the permissible leakage of electromagnetic waves is stipulated by law, and each company's products are manufactured to comply with it. The EU has the EMC Directive and the US has the FCC standard.
In addition to audio equipment, there are many familiar products that emit electromagnetic noise, such as washing machines, refrigerators, vacuum cleaners, air conditioners, microwave ovens, televisions, solar power generators, and mobile chargers.
Noise from these devices appears mainly as noise in the LF/MF/HF bands. Noise can be detected by placing an AM radio close to the speaker wires of a Class D amplifier. But you can't hear it if you're 1m away. Fortunately, the noise from a Class D amplifier is very weak.
I have previously worked to investigate the actual state of disturbances caused by EMI and EMS in the EMC Directive. Modern society is built in a high-level electromagnetic noise space.
About the EMC Directive stipulated by the EU
EMI is Electromagnetic Interference. It means the electromagnetic noise emitted from the machine itself, and is evaluated by the emission test. EMS is Electromagnetic Susceptibility. This refers to the influence of electromagnetic noise emitted from other equipment, and is evaluated by immunity testing. EMC stands for Electromagnetic Compatibility. This means the influence of electromagnetic noise emitted from your own device and electromagnetic noise emitted from other devices. In other words, EMC is a concept that combines EMI and EMS.
Search online for details.