What is the purpose of lossless H.264 vs. ProRes or the like?
Is it similar to lossless audio were there's not a ton of optimization you can do?
Lots of hardware requires specifically h.264 as a transit; many of the MPEG standards are built around it. So this lets you get MPEG-PS, or lossless BDs, or some hardware/specialized software decoders for machines that otherwise couldn’t keep up (like set top boxes).
prores is not lossless. It's also an intraframe codec so compression is not great.
I've attempted to get researchers to use lossless H.264 to encode CT scans. They typically use directories full of tiffs. Even with intra-slice compression (i.e. tiff compression) they are pretty huge. But H.264 will let you recover the original images to the individual bit, and save a huge amount of space thanks to inter-slice similarities.
They are still using directories of tiff, though.