For #1, it will depend on how your system was set up. Either the system is masking the leading digits from the carrier and doing a direct match on the last 4 digits, or there's entries in Direct Inward Dialing Service form to map each DID to an extension number. If there's no data in the DID Service form, you're doing the first one.
For #2, it will again depend on how your system was set up, but I'd be willing to bet that group of phones is restricted from dialing out (except for 911). Check the COR setting for those extensions versus one that can dial out, there's probably a difference, the restricted ones are probably using a COR of 1 and an allowed would maybe be using a COR of 3 or 4 (again, depending on how your specific system was set up).