Some MP4s have keyframes on scene changes. Others seem to have random keyframes, or keyframes every X seconds. What causes this discrepancy?
Putting keyframes on scene changes is more efficient encoding wise on average, but it can cause trouble for decoders with very small buffers. Constant keyframe intervals (GOP Length) and CBR were more necessary when people were viewing videos on iPods with very little memory, as opposed to phones with a gigabyte or more of RAM. 

This is an answer explaining how to configure it in FFMPEG: https://stackoverflow.com/a/41735741/8599496