Your home built video compression software does _not_ achieve the compression ratios of commercial software. Differences can be between 20-50% pretty easily. It also does _not_ have the reliability.
x264 is good but not the benchmark. x265 is simply mediocre.
That aside, as others have pointed out, there is the whole "in the cloud" thing which has to do with global TCO.
Also the pricing you can get of the AWS site doesn't look a thing like what an actual content distributor with 100 of thousands of hours of content gets.
BAMTech (now Disney Stream Services) does not build their own video encoder IIRC. That's because encoding costs are a drop in the bucket compared to their distribution costs.
What does them "building their own encoder" instead of using someone else's encoder have to do with whether they do encoding using AWS's managed services or not?
It depends on both what you are optimizing for. People cost money. If you can trade enough of your time by having a cloud provider do the “undifferentiated heavy lifting” to focus on your core competency, then it makes sense to use a provider.
For instance it didn’t make sense for DropBox to stay on Amazon but it did make sense for Netflix.