This is something I was wondering among colleagues. So I googled it, see below:
The most logical theory dates back to the early days of office telephone systems, where exchanges were mechanical and telephones had rotary dials. In those days, the number you dialled had a physical effect on both the phone and the exchange – the higher the number you dialled, the longer the dial would take to turn back to its default position and the longer the digit would take to dial. For that reason, goes the theory, local extensions, which were the most commonly dialled numbers, tended to start with low numbers; 1,2,3… you get the idea. And so, unless the building was particularly huge, the chances of an extension starting with a 9 were small.
While any digit could be chosen to access an operator, or dial an outside line, using a number which could also be the start of a local extension would mean the PBX would still have had to wait for several seconds before ‘deciding’ that the single number was all that had been dialled and wasn’t the beginning of a longer series of numbers needed to dial an extension. Thus negating the key benefit of adopting that system over the time out. So choosing a 9 meant that in most cases, because there were no extensions starting with a 9, the PBX could flip straight to an outside line, without waiting.
Source: Mental Floss