I believe that we all have an immature side which wishes - or sometimes pretends - that our unwise and ill-considered actions might not have negative consequences. Some people have more of that wish, some less. Also, some people learn from bad experience better than others.
(I am not talking about neurotics who unconsciously or semi-consciously invite trouble upon themselves.)
As parents, we often have to invent consequences, eg a spanking if they run into the street, or grounding if they defy a curfew. However, the best teacher of consequences isn't parental discipline: it's Mr. Reality, aka The School of Hard Knocks.
Dr. Dobson has a brief simple discussion of the topic: Behavior and Consequences - The effective use of a powerful parenting tool