The army determined that in 1946. There has never been any test, study, or research that proved 45 was any better. But most people believed it so because they heard someone say it was. From a purely ballistic standpoint I believe 40 or 10mm has a slight edge over either 45 or 9mm. But not enough to offset the negatives.
Yes the army did tests in 1904 to determine the best caliber for a sidearm.