I was wild in my teens and twenties and it did take having children to calm me down. Having a mega hangover with small children relying on you is absolutely horrendous. I don't think the OP is saying that life has no meaning until you have children, but small people needing you to not be vomiting all day certainly puts a lot of obstacles in the way. Going out partying every weekend, drinking copious amounts and taking recreational drugs requires a huge amount of space for physical and mental recovery. Impossible with kids up at 6am needing food, entertainment and bums wiped. Doesnt mean life has no meaning or purpose before, its just means it can unbearable to do both.
I'm a tee totaller now but don't mind the odd night out for a laugh and a bit of a dance as long as I'm in bed by 1am, though even just a late night gives me a hangover these days.
I do feel that alcohol is a trap for a lot of people rather than the nights out themselves because in my pre kids days, if I wasn't going out ai would just get drunk by myself.
In or out, I honestly cannot believe that I escaped that phase of my life unscathed as I got myself into a lot of very risky situations. Now even a small amount of alcohol feels like it is absolutely draining my battery and that it is a poison, the benefits of which are massively outweighed by the negatives.
For people with addictive personalities (like myself) there often is an inner void which substances and the thrill of a night out (especially if you were going out in the early 2000s-2010 era) filled. For people like us, children not just presented a need for us to be present and sober at the weekends, but also represent a more stable period of our lives, eg finding a solid partner, making commitments through marriage and mortgages etc.
People without kids have these too, but I do get why the OP mentioned children, as it is a huge deterrent to going out and taking party drugs, but having them often happens at a time when internal shifts away from the nightlife scene are happening anyway.