Pain is known to be an excellent teacher.
Consequences have to affect those who made the decisions leading to the consequences in order for it to be an “excellent teacher”.