I worked at a large company. My manager told me there's a legal requirement to post jobs publicly even though the position was intended for internal hiring. I don't know how true this is. If it is true, this could explain some of the 'ghost jobs'.
Had it happen for me once as well. A new team was being formed that I was part of. I was given a certain job post ID to apply for that was meant for me. Some people got upset, because they were told to apply for a level 2 position, when they saw a level 3 or 4 position was also out there that they wanted to go for… but the decisions had already been made.