I don't have much theory to post, but I think that the following screenshots may help illustrate the problem. We're seeing square waves at various frequencies as seen by a Realtek ALC 268 sound card with 16 bit resolution and 96 kHz sample rate. The sound card example here is done on purpose because sound cards have very limited input capabilities.
First we have 1 kHz:

As we can see, the shape looks pretty nice with almost no distortions.
Next we have 2 kHz:

Here we see a bit of distortions.
In order to keep the length of this post reasonable, I'll skip some steps.
Next we have 8 kHz:

Distortions here are obviously visible.
18 kHz:

Even more distortions and the square wave is slowly starting to look triangular.
Here we have 28 kHz:

We're getting spikes now.
30 kHz:

We've lost the signal shape by now. Frequency's still good it seems.
38 kHz:

It's even worse now. We're losing the flat bottom of the signal.
45 kHz:

We're seeing only spikes by now.
48 kHz:

We're at half of the sample rate now and the frequency is getting bad.
Finally we have 60 kHz:

What we see is now barely related to what we have.