And in EU, it is technically not prohibited, but haven't really been a thing for a long time.
One caveat: carriers do not really pay for your phones. Your phone bill would list two separate charges: service charge, for calls, internet use, etc., and then the monthly payment for your phone. If you add all those monthly payments over the whole contract period you get maybe 5-10% discount to the regular market price.