Equal Access

By law, each LEC must give "equal access", which means all customers must have access to any IXC, and vice-versa. Therefore, is an IXC becomes established, they must be allowed to have a trunk line between their own office and each of the LEC offices. In a word, the LEC can't say "no".
The LEC switch does a lookup of each customer that dial a long-distance number, and hands off the call to the appropriate IXC, by sending the call out the appropriate trunk
NOTE: there are exceptions. Some areas are only served by one IXC, so of course, they can only offer long-distance service trought that particular IXC. If a small area is served by one IXC, it is often cost-prohibitive for another IXC to try and gain a fooyhold in that area. This is common in rural areas, and portions of the country with low populations, such as the midwest.