You can teach them to check their air regularly by the degree to which you emphasize it during the training. I make a pretty big deal of it myself. Students are in buddy teams throughout the confined water dives, and I tell them to check each other by asking for their remaining pressure frequently while they are not being actively involved in a skill. Other instructors might barely mention it--it is only required once in the CW training in the PADI system. You cannot, of course, guarantee that they will follow through on their dives, particularly when they are diving deep and might be impacted by narcosis.
As I was taught this drill in PADI, it is not supposed to be a surprise; you are supposed to make sure the student is OK with it before starting. The exercise as it is done, though, has limited practicality because, IMO, it has been made obsolete by improvements in equipment. The supposed purpose of the drill is to have students recognize that they are getting dangerously low on air by experiencing the change in the difficulty of breathing before they are OOA. Unfortunately, with modern regulators and the shallow depth of a pool, there is no noticeable change in the difficulty of breathing. You are just suddenly OOA. Consequently, it teaches nothing of value.
In real diving, I have intentionally run stage bottles (AL 80 tanks you carry and breathe down before you switch to the gas on your back) down to just about empty at depths of 150 feet or more. When that happens, I always can feel the regulator start to breathe heavy before it runs out. I have, of course, been watching the gauge, so I already have the next regulator ready to go when that happens, but at that depth I can definitely feel a tank running low--and that is with a pretty good regulator on the tank.
So when I do this drill, I modify it. I first signal the student and then I take the gauge. I do not let the student see it. I then almost shut it off, playing with it until I see the needle start to bounce off the bottom as the student breathes. At that point, I know the student is feeling some resistance in breathing. It is at that point that the student signals OOA, and I turn the air back on, which is a PADI requirement.