Bullhead rail is easier to manufacture. A major difficulty with manufacturing rails is the newly-rolled hot rail warping as it cools, due to differential contraction between the head and foot. With bullhead rail the head and foot are much more nearly the same section, so the cooling is more even and the warping is less. The degree of process control necessary to minimise warping and to effectively straighten the rails afterward was not developed until well into the 20th century, and the widespread use of flat-bottom rail is a comparatively recent development.
At one time it was thought that bullhead rail could be made to last twice as long by turning a worn rail upside down, but when they actually tried this it turned out that the original foot side got dented by the chairs and it caused very rough running.
Replacing bullhead rail with flat-bottom means also replacing all the sleepers and chairs. Flat-bottom rail is most advantageous for high-speed heavy-duty applications. On lines which are lightly used, which only ever see low speeds, or which are maintained only to a minimal standard, there basically isn't any point going to all the trouble of changing it just for the sake of it, so bullhead can persist for ages.
Yes, the keys do fall out, and people have to go along with a hammer every so often to put them back in and knock back the ones which are only half-way out. Me, I'd make bullhead chairs with lugs on the ends to put a retaining pin through to make sure the key couldn't fall out, but nobody else seems to have had this idea.