It's a balance of efficiencies. On the one hand, false "1"'s can be generated by wind, etc, on the line. "111" calls can butt-dialled by sagging trees. With the rotary, "9"'s are nice and distinct.
On the other side of the balance, users perceived "9" as taking aaaaages, partly because they're bloody users and never satisfied, and partly because in emergencies perception of time gets tweaked. Anyway, 999 it was, and remains.
> The 9-9-9 format was chosen based on the 'button A' and 'button B' design of pre-payment coin-operated public payphones in wide use (first introduced in 1925) which could be easily modified to allow free use of the 9 digit on the rotary dial in addition to the 0 digit (then used to call the operator), without allowing free use of numbers involving other digits; other combinations of free call 9 and 0 were later used for more purposes, including multiples of 9 (to access exchanges before STD came into use) as a fail-safe for attempted emergency calls, e.g. 9 or 99, reaching at least an operator.
I assume rotary dial phones are now all but extinct. I used one about 20 years ago (to win free tickets from a radio station, and succeeded!) but even then they were rare.