Amazon getting into on demand hosting early is in it's DNA. If you look at them as a business that grew up on earning profits on very small margins. And that early on demand hosting was pretty low margin, that in their case also let them offset some risk of building data centers earlier than they would have otherwise.
Bezos graduated summa cum laude electrical engineering and computer science and then had a fair part in building out Amazon's own infrastructure. He probably knew that stuff quite well even if it was only a support to the core business.