There is a difference between training dives and fun dives. Every agency prescribes a maximum depth for a certain training dive.
The generally accepted sports diving limit, or recreational limit, is 130ft/40m.
Open Water course dives are limited to 60ft/18m, AOW course dives are limited to 30m, Deep specialty course dives are limited to max 40m.
Even technical course dives have a maximum depth limit. E.g. you might be trimix certified, when you do intro-to-cave your depth limit is defined by the course standards.
How deep somebody dives during a fun dive, is his/her own choice, and responsibility. As long as this person remembers how deep he/she was trained for. Diving to 40m depth is just as easy as diving into a cave. Getting back is when the challenges come into play.
PADI does not prohibit you to go a few feet deeper than you were trained for, nor does any other agency. That's part of gaining experience.