Well for whatever reason Han stopped on Tatooine, I'm sure one of Jabba's spies saw him, got word to Jabba, and Jabba had Greedo waylay him. The debt must not have been very old or Han would have never stopped by Tatooine until he did have the money to pay Jabba, knowing there probably was, or going to be, a price on his head.