Actually, a few early films ran at higher rates that 24 fps. The early color process Kinemacolor ran around 48 fps so that it could display red and green frames quickly for the illusion of color.
The earliest films were shot at about 16 to 18 fps, because that is all that was required to reproduce motion without much flicker. Comedy producer Mack Sennett used a slow fps to save film (and costs) and because his comedies would be fast-paced when projected slightly faster. Silent comedies were actually meant to be projected slightly faster than real life, so that the comedians' movements would be more smooth.
Very early projectors were hand-cranked. By the 1910s they had speed governors on them, but since different speeds were used by different cameramen, sometimes on the same film, the projectionists would have to adjust the projection speed. And theaters would usually show films slightly faster so that they could get more shows in a day (but this did not happen everywhere).
While there were sound film experiments all thoughout the silent era, the talkies didn't officially arrive until Warner Brothers introduced Vitaphone sound films in 1926-1928. By this time, the average camera speed was indeed around 24 fps, but many films were taken faster, even at 26 fps. Western Electric sound engineers surveyed cameramen and setted on 24 fps because it was as close to an industry standard as they could get back in these analog days.
When watching a video of a silent film, especially an older video, don't forget that some restorers did not speed-correct the films for modern television. Charlie Chaplin stretch-printed his early films by duplicating some of the frames so that they could project at 24 fps in sound projectors and on TV. While this corrected the speed, it does make movements slightly jerky. Many producers of TV documentaries in the 1950s through 1970s ran early films at 24 fps even though they had been taken at 16-18 fps, making the action unintentionally comical.