I've been on another side of this, where the 1st pick didn't work out and I got called back after previously being turned down. There really is no rhyme or reason for some things, only circumstances that can change for nearly any reason.
It's likely not your fault, so move onto the next opportunity. This is one of the reasons why people on this stack say not to turn down other offers until you have something signed and finalized.
There's really no way for you to find out the real reason, even if you ask them. They'll likely give you a non-answer such as "We decided to move in a different direction." Different direction? Which one? What does that even mean? Hint: It means nothing, which is why it's their answer.
As other Answers said, it's not normal, but it happens. Yes, it's oftentimes because of a decision made by upper management. One job I got as a 2nd choice was because the first pick failed the background check. Something they did put them on an internal "blacklist", but that wasn't determined until after they were offered the job. And that's really rare. Someone has to do something really bad, like deliberate harm to the company (such as corporate espionage or physically attacking a co-worker), for that to happen. If you haven't worked for this company before or haven't hacked their servers, this probably doesn't apply to you.
I worked one position for 7 months before the company decided to get rid of all the various contract companies and consolidate them to one. Unfortunately, I and several hundred others lost our jobs. The new company was supposed to hire the people already working the position, but the caveat was that it was at a lower technical level, so most of what we were doing was now going to be done by someone else anyway. I'm sure there were a few people in the hiring pipeline when that mess happened and it wouldn't surprise me if they ended up in the same situation as you. It wasn't anything any of us did, just that someone thought they could save money by getting rid of the various contracts. I guess they didn't understand they were going to cost the company all that domain knowledge. But I'm getting off topic here.
In the end, you probably dodged a bullet. It doesn't feel like it, but if a business is going to do something like this, they may have a history of bad management. This can lead to all kinds of bad things. Or all kinds of bad decisions led to a decision to not spend money on you. As others have said, there's no way to know what's going on, so it's best to just move on.
And yes, I realize that won't make you feel better about the situation.