Lossy compression makes a file dramatically smaller by throwing away information you weren't going to notice anyway. Every practical video codec — H.264, HEVC, AV1, VP9 — is lossy. The opposite, lossless compression, keeps every original bit but only manages to shrink video by a factor of 2–4× — not nearly enough for streaming, where compression ratios of 100–500× are routine.
What gets thrown away is carefully chosen. Codecs lean on three weaknesses of human vision: we don't notice subtle colour shifts as much as brightness shifts (so colour resolution is cut by chroma-subsampling); we don't perceive very small high-frequency details as accurately as low-frequency ones (so the encoder quantizes high-frequency dct coefficients more aggressively); and we don't track precise pixel values in busy or moving regions (so the encoder spends fewer bits there). The result: huge size savings that look essentially identical to a viewer.
The trade-off lives in how aggressive you set the loss. Push compression too far and visible artefacts appear — banding on gradients, "blocking" on flat areas, mosquito noise around text, smeared motion. Modern smart rate control modes (crf, capped CRF, per-title encoding) keep loss invisible most of the time by varying compression strength scene by scene. For business decisions: lossy is what makes video distribution economic, lossless is reserved for production masters and archival.

