It has happened in the past, sure, but I still don't agree with it. How can you move up if you don't fight up? The only way I agree is if guys fall off the list and you move up by default. This may be what happened.
Rankings aren't based on just one person's performance. Look at the LW division. You had guys like Sotiropoulos move into it by default. For starters, nearly half of the top 10 were non-UFC guys (Melendez, Alvarez, Aoki, and Kawajiri). So you can't very well beat them. Then, you have guys moving weights. Then you have guys losing and dropping down (as you mentioned). You have guys falling off from inactivity.
So one guy loses, you move up by default. Somebody beats you and they have a top 10 win. There are many things that go into how rankings are formed.
Dan Hardy was #4 with only a single win over Mike Swick (barely Top 10 at the time).
Hardy was definitely overrated, but he probably deserved Top 10. His win streak included both Swick and Marcus Davis, who was looking like a decent fighter at the time. Also, the UFC was in an awkward position with GSP back then. They didn't want to keep feeding the best guys (Kos, Fitch and BJ) to GSP over and over again, so they had to try some wild cards. That said, Hardy-GSP was one of the worst title fights in recent memory.
I can't speak for Sherdog, but I can use Fight Matrix rankings to show why Hardy was so high.
He was #17 already when he was signed with the UFC.
His first UFC fight was against Akihiro Gono, who was #10 at the time. A lot of people seem to forget about Gono and that Hardy beat him. That win put Hardy at #10.
Rory Markham was #40. It didn't do much for Hardy's ranking. He just moved up one spot to #9.
Marcus Davis was #22. At that point, Hardy was down to #11 due to big wins for Hughes and Sakurai, who both jumped him in the rankings. After that win, Hardy just moved up one spot to #10.
Mike Swick was #5. Hardy had been pushed back to #11 by then. After that fight, Hardy was moved up to #5.
That is how he got his high ranking, at least with Fight Matrix. The Gono and Swick rankings are what really got him up there. Not to mention he was already ranked pretty high as he was already a high level non-UFC veteran/UFC prospect when he was signed. His ranking isn't as wild as people seem to make it out to be, IMO.