That was a really smart move on Sonny's part. Fredo, suffering from a nervous breakdown and not too smart in the first place, would have been a sitting duck for the Five Families--either as a murder victim or hostage. By sending him to Vegas under the protection of a neutral family, Sonny made sure his brother'd be safe. He got something useful to do. And, by bankrolling Moe Green's casino in return, he established a stake in Vegas for the family that Michael redeemed later.
Fredo almost messed up the getting a foothold in Vegas when he took sides with Moe Green against Michael when Michael told Moe he wanted to buy him out.