Yeah, but, does it, tho?
'Everything happens for a reason; sometimes the reason is I'm dumb and make bad decisions.'
Let's assume we have free will, although it's a bold assumption.
If we have free will, and that will can be out of alignment with God's will, then something that is out of alignment with God's will can happen. It's therefore wrong to say, 'it's God's will' when it flows from the exercise of human will, mine or someone else's, as least at the level of the act itself (see below on the subject of whether the fact that we have free will is itself God's will). Let's leave aside, also, the question of God's foreknowledge. A big and thorny topic in philosophy.
Why do things happen?
A practical list: the laws of physics and everything that flows from them (biology, geology, etc.), quantum indeterminacy, other people's will, my will.
Now, God is behind a lot of that, including, arguably, the establishment of free will, but determinism is probably not in accordance with the principles of the programme, even if its arguably defensible from a philosophical and scientific point of view. We are forced to live as though we have free will and must make decisions (even if that is a complex illusion).
Where does this leave 'everything happens for a reason', and can we use it as a slogan?
When the wind blows a flowerpot off a windowsill, the wind is the reason, but the wind did not will this consequence. In other words, everything at the level of medium-sized objects (so not subatomic particles and not universes) (probably) is there for a reason, although reason is not synonymous with purpose. Purpose is one reason, but there are others (see above: laws of physics, etc.)
That means, if I trip over and break my leg, I cannot infer that, because there is a reason, there is a purpose. God is not trying to teach me a lesson. In AA, people sometimes say, 'X [= some major society-level challenge or catastrophe] is God's way of telling me that ...' as though the universe (and even other people) are constantly being rearranged as an obstacle course-cum-curriculum.
However, I can actively purpose that fracture: time off work might allow me to devote more time to spiritual growth. Lack of purpose does not mean futility. Lemons & lemonade, obvs.
Equally, we have to face the fact of apparent randomness at the level of medium-sized objects (which may flow from real indeterminacy, e.g. in the Schrödinger's cat experiment, or from a complex set of deterministic causes). Sometimes bad things happen because 'it's my turn' and it might just as well have been someone else. But it wasn't. Why does this atom experience radioactive decay and not another? No reason. The process is stochastic.
Sometimes bad things happen because of me: 'Well, well, well; if it isn't the consequences of my own actions!' Sometimes I 'suffer' because of others' actions.
In short, 'why' is not a helpful question, usually, unless I'm tracing my own culpability.
But I can adopt these two measures:
1. Accept reality as it is right now.
2. Ask how best and most fruitfully I can proceed from here.