“Amazon EC2 Spot Instances let you take advantage of unused EC2 capacity in the AWS cloud. Spot Instances are available at up to a 90% discount compared to On-Demand prices.” https://aws.amazon.com/ec2/spot/
As a monopoly Google could sell the same capacity YouTube is using on Google cloud services and YouTube could then buy that capacity. If YouTube was treated as any other customer it’s fine, if YouTube got preferential treatment it’s not fine.
I doubt anyone is going to take them to court over this but it is likely illegal.