Audio sampled at 44.1 kHz (like normal audio CDs) can in theory contain content up to the Nyquist limit of 22.05kHz. However, you need a filter to remove all content above that limit, otherwise it folds back into the hearable range: you hear this as aliasing.
A perfect, theoretical filter would remove all content above 22.05kHz and leave everything else unaffected. This would be an infinitely steep low-pass filter.
In practice, such a filter doesn't exist, so a very steep low-pass filter is set at about 20 kHz, so that the attenuation is sufficient at 22.05kHz to make the aliasing inaudible.
Besides, a perfect human being hears frequency content up to 20kHz. Most, if not all are not perfect, so depending on age and other factors they don't hear anything above 16/17/18 kHz. This means this practical filtering is not a problem for everyday listening.
A lossy format, like mp3 or aac, analyses the audio and manipulates it in such a way that it can be saved using less data, while minimising the audible effects this has. This could also mean that certain peaks are saved unfiltered, because the algorithm knows the super-high-frequency content which is that quiet will be masked by the rest of the audio, or even be completely inaudible to the human ear.
The peaks in your spectrogram could also result from the decoding algorithm performing insufficient filtering for the peaks to show up in the analysis. This doesn't automatically mean that the filtering is bad: do you hear these spikes? Probably not.