Need a new range but only have 30 amps
It's possible because a range has it's electrical requirements calculated based on a certain usage pattern that might not be realistic.  They might require 40A, because if you turn on the oven and all the elements, it's going to draw 40A.  But, no one really does that.  You might use the oven and one element, or no oven and two elements...

That's the answer of "how is it possible that my neighbors are doing this".  The range will work.  Heck, if you only use one thing at a time then I bet you could make it work on a 20A circuit.  The circuit breaker or fuse protects the wiring in the walls, so if you use more than 30A, the fuse should blow, and there should be no danger.  The problem is, that's a lot of shoulds and you're working with very old wiring.

So, as with most electrical "rules", it comes down to safety and liability.  Sure, you can install a 40A range and it will probably work fine - right up until it doesn't.  If a fire starts in the condo walls, is it your fault because you installed the wrong range?  Will insurance cover the damage if it was an improperly installed appliance?  Would someone die?  At the very least, it would void the warranty of the new range.

The point is that you can do a lot of "illegal" stuff with wiring, and it will work just fine.  It might never cause a problem and work great forever, but there are edge cases that he electrical codes guard against.  The codes tell you how to be as safe as possible.

To sum up, and answer your question, I think that using a 40A range on a 30A circuit is low risk with normal range usage, but all bets are off if you have people over and they start turning on more burners than normal.  You should upgrade the wiring to be safe.  Or... just repair the old range.