The setup: A website that streams uploaded videos using ffmpeg on the backend. Different video formats are served based on the needs of the client-device.
My understanding is that some websites keep the same video in multiple formats, while others convert the non-HTML5 video (say) into HTML5 video on the fly if the client-device calls for HTML5 video.
Why do one over the other?
Most websites/hosting platforms will keep the same video in multiple HTML5 video compatible formats (mp4 and webm as of today) for on demand delivery. Processing video on the fly requires CPU/GPU and that can cause penalty on the server load if too many people watch videos at the same time. Upstream transocding + storage/CDN is often less expensive and better for scalability.
Live video streaming is another story because you can get MPEG2 (or else) input and this often needs to be converted on the fly to multiple H264/AAC renditions either with ffmpeg or adds on like Wowza Media Server Transcoder.
EDIT:
why do sites still host Flash and non-Flash (i.e. HTML5) versions of videos?
Most do not and you do not need to. They use MP4 files to be delivered on both Flash and HTML5. You can find FLV or F4V (Adobe flavor of MP4) but they are either legacy, ads oriented, or flash only environment files (FLV can be used to store cue points for example to trigger animation at certain point of a video). Youtube for say mostly used MP4 files but you will find they deliver both flv and 3gp files (mobile) as well.
HTML5 is universal and can play on any client. Flash is restricted to PCs. By now they should have dumped Flash.
You can find on SO or Google articles describing the pros and cons of Flash vs. HTML5. Momentum on the market today is HTML5 first with a flash fallback. HTML5 video is "only" available in 80% of current browsers. You would understand why major players like Youtube or Brightcove just won't let go of the remaining 20% audience. Vimeo has made the switch for an HTML5 video first strategy. Flash still holds some grounds HTML5 video has not yet covered (or is only beginning to):
Flash does not play on iOS and Android - that is a clear win for HTML5 video and a major drawback for Flash. One growing caveat at the moment about flash is it being a plugin. That throws security and performance concerns. For example Microsoft has announced they will drop support for Silverlight in the coming years and is moving towards HTML5 video. Java (client side) is getting blocked more an more.
Not a good day to be a web plugin nowdays ...