Hosting and bandwidth for videos has a big cost.
Plus it's computationally expensive. YouTube has entire data centers filled with servers using custom silicon to encode ingested videos into nearly every resolution/framerate and codec they serve, so that different clients get the most efficient option for their quality settings and supported codecs, no matter what the original uploader happened to upload. Granted, that workflow mainly makes sense because of bandwidth costs, but the high quality of the user experience depends on that backend.