MPEG-2 TS is a container. H.264 is a coding specification. They are totally different things.
One can find MPEG-2 TS in surprising places (see: DOCSIS encapsulating Ethernet frames into TS packets).
If I had to guess why MPEG-2 TS, it'd probably be the for the fact it's a well-supported streaming format in both hardware and software. If you tried using QuickTime or MPEG-4 containers, you'd have to rely on hacks like ensuring the moov atom preceeds mdat.
Matroska may be worth considering (especially the subset used by WebM to make it stream-friendly and quicker to seek), but no idea how widespread hardware support is for (de)muxing that.
Before ProRes, we captured HD content at 100Mbps MPEG2 video with PCM audio wrapped in a 302m stream that were muxed together as an MP2TS wrapper. The 302m made it even more difficult as not all MP2TS tools could do it correctly, and some would not allow for custom Program stream IDs and needed to be remuxed by other tools allow for custom PIDs as a post process.
But seeing how many uses people came up with for using MP2TS just shows it's flexibility and resilience.
The MPEG-2 Transport Stream is a container; you aren't forced to use the mpeg-2 video codec or mpeg audio codecs. Blu-Ray uses mpeg2 transport stream with various audio and video codecs. ATSC 1.0 uses mpeg-2 transport streams, typically with mpeg2 video and ac-3 audio; ATSC 3.0 uses mpeg-2 transport streams, typically with a newer video codec and ac-4 audio.
Adding this might make it easier to stream broadcast content or maybe content from blu-ray discs. DVDs are commonly in MPEG-2 program streams, but I guess you could convert on the fly.
MPEG-TS is used to contain h264 chunks for HLS. MPEG-DASH and the new CMAF standard use fMP4 containers instead. My personal take is that Media over QUIC (MoQ) should support both.
The Internet you are referring to is not meant for low latency streaming. This is what it takes make it low latency. MPEGTS is proven stable and ubiquitous. If only it has less overhead.
Transport stream is specifically meant for unstable connections vs Program streams used for DVDs with a nice steady data stream. Digital cable signals and other signals use transport streams specifically because they can resync if things do get out of sync.
But yes, working with TS feels kludgy. I haven't had to deal with them in over a decade, but there was one tool that made it all super easy, MP2TSME, that I hear is no longer available
One can find MPEG-2 TS in surprising places (see: DOCSIS encapsulating Ethernet frames into TS packets).
If I had to guess why MPEG-2 TS, it'd probably be the for the fact it's a well-supported streaming format in both hardware and software. If you tried using QuickTime or MPEG-4 containers, you'd have to rely on hacks like ensuring the moov atom preceeds mdat.
Matroska may be worth considering (especially the subset used by WebM to make it stream-friendly and quicker to seek), but no idea how widespread hardware support is for (de)muxing that.
But seeing how many uses people came up with for using MP2TS just shows it's flexibility and resilience.
Adding this might make it easier to stream broadcast content or maybe content from blu-ray discs. DVDs are commonly in MPEG-2 program streams, but I guess you could convert on the fly.
But yes, working with TS feels kludgy. I haven't had to deal with them in over a decade, but there was one tool that made it all super easy, MP2TSME, that I hear is no longer available