Logical reasoning. The question should not be why Fett did it, but why none of the other bounty hunters did it, too.
The Falcon had to have a dysfunct hyperdrive, this must have been obvious to the Imperial forces. There was no other explanation why Solo would perform a stunt involving an asteroid field rather than pulling The Lever and waving goodbye (you wouldn't even fly through an asteroid field for impressing a woman, heh!). Everyone else jumped, only one ship didn't.
The Falcon then instantly disappeared in direct neighborhood and in plain sight of a star destroyer (well, apart from everyone ducking and closing their eyes anticipating a crash) and well within sight of other star destroyers and smaller vessels). How did that happen?
- It clearly didn't do a hasty-entry hyperjump in close proximity to a star destroyer and an asteroid field (even if the hyperdrive had been functional), but even if that had happened, the star destroyer's scanners would have shown it.
- It clearly did not teleport or disappear by magic, or by a Jedi mind trick.
- It didn't collide with the Avenger's bridge (Needa would most certainly have noticed that happening!).
- It didn't otherwise collide and/or explode. No such thing on the scanners, no shockwave, no debris.
- It wasn't brought up and didn't surrender.
So the only reasonable conclusion was: It is still there. It must be. Hidden or cloaked (however unlikely for a ship of that size), whatever... it is still there.
Fett did not need to know where the Falcon was hidden or what Solo's plan was, or how he had done his vanishing trick. All that mattered was what the captain of a ship that is unable to perform a hyperjump and being pursued by star destroyers can do. There are not a lot of options.
He can only wait until everybody else is gone. Then, he'll come out of his hiding place, and, using sublight drives, try to reach a nearby star system -- praying that none of his pursuers come back and nobody crosses his path.
Fett therefore needed to do a little "vanishing trick" of his own, so he could wait and see what happens without being noticed himself. No matter where Solo was hiding within the system, the moment he turned on his ion engines, he would be the single bright spot on the EM scanner.
Hiding in the trash was an obvious manueuver for someone intimely familiar with Imperial standard procedure, and safer to perform than to fly to a nearby asteroid (doing so he would likely have been spotted), so that is what Fett did.