Well, my story about the "upgrade fairy" aside
we have had pretty good luck with upgrades. What are the factors? Nobody knows. Now in our case, my DW is a local Travel Agent booking through a good network. Does that help us any? We are also Elite on Princess. Does that help us any? We usually book far in advance. Does that help us any?
We almost always book guaranteed on the least expensive outside cabin. On several occasions we have been upgraded from obstructed outsides to good outsides on high decks. Twice we were upgraded from obstructed outside to balconies. Some of those times our traveling companions on linked records were also upgraded, once to the balcony cabin immediately next to ours.
Other times we have received no upgrade at all, and cabins in the "least desirable" locations of the category we booked.
So who knows??