Sometimes things end up happening in ways we don’t expect. That’s when we learn the hard way.
learn (something) the hard way
to discover what you need to know through experience (by trying to do it), or by making mistakes:
He doesn’t want to take my advice, so I guess he’ll have to learn the hard way.
He learned the hard way about the harsh reality of the boxing world.
Make sure you put the baby’s diaper on before you start feeding her. I learned this lesson the hard way.