An ideal square wave is not a signal that is band-limited to the audio range, so attempting to sample it directly (the naive approach) doesn't work. Instead, you want to sample a band-limited approximation of the square wave (which is what BLEP, etc. do).
If you're synthesizing, the naive approach doesn't work because the interaction that occurs between the square wave transitions and the sample rate introduces energy into the passband as a beat frequency. Yes, this interaction is aliasing, which is what we expect to get when sampling a signal that is not band-limited to our passband. That BLEP oscillator or other polyphase techniques are needed in order to synthesize a correctly sampled band-limited approximation of a square wave.
Similarly, if you're sampling an analog square wave with a high slew rate, you absolutely must have an analog anti-aliasing filter in front of your ADC, or you will end up with exactly the same beat frequencies in your sampled signal.