ffmpeg with h264 produces smaller file sizes for veryfast preset
I was able to find an answer. https://stackoverflow.com/a/14308561/941493.

In the nutshell, CRF calculation is also affected by preset so the same CRF number is not the same with different presets. Based on some developer difference can be mostly ignored.