Can't speak for anywhere else, but it was clearly established at Amazon that any relocation assistance had to be returned (prorated) if I left before 1 year. I don't imagine that's terribly unusual, but many companies might not make it as obvious if they don't have the same high turnover rates as Amazon.
That sounds like bad financial advice, and that you’d be be better to accept it and put it in savings for however many months. If you don’t stay the required amount of time, return the money. If you do, ta-da, it’s yours.
Understood. Even then, if someone offers you money on the condition that you may have to pay it back, unless there's a penalty involved, you almost always want to take them up on it.