Local office depends on geographical area in which the applicant resides. For a large metropolitan area like the GTA, there are multiple local offices. Precise office probably depends on the applicant's postal code and it appears that it is not always the office closest to the applicant's residential address.
During the Harper era many local offices in smaller cities were closed and the areas they covered were transferred to the remaining local offices, mostly in the larger cities. Those areas are now serviced by what they call
itinerant services, meaning the local office (which can be a long distance away) handles processing the application but events involving the clients, like tests, interviews, and oath ceremonies, are periodically scheduled at a temporary location. Basically the IRCC staff travel to the more or less remote location and conduct the event in a local facility.
Even before the Harper era consolidation of local offices, there were itinerant services provided for various more or less remote areas.
Thunder Bay, Ontario is an example of a smaller (but not so small city) and relatively remote (many hundreds of kilometers from the next nearest city of any size) location where there was, for a long time, a local office, which local office was closed by the Harper government. The local office which processes most applicants from North Western Ontario, those previously processed by a local office in Thunder Bay, are now processed in the Mississauga office, well over a thousand kilometers away. At least twice a year, some years four times or so, IRCC will provide itinerant services in Thunder Bay. Actual location utilized for these services, in Thunder Bay, can vary. Oath ceremonies in particular appear to be held at various locations on different occasions, ranging from City Hall to the Lakehead University Law School, among others.
There are some advantages and some disadvantages. One advantage is that IRCC is more likely to schedule oath ceremonies within a day or three of test and interview, and for many if not most readily verified qualified applicants, they are virtually scheduled for the test, interview, and oath concurrently. No anxious checking for Decision Made and watching for notice of the oath ceremony date. One disadvantage is that many months can go by in-between dates the itinerant services are provided (and this can be significantly longer for smaller locations, perhaps as infrequent as once a year), so if the applicant is not in queue for an upcoming event, it can be a long wait until the next scheduled event. Similarly, if for any reason any follow-up (security clearance checks for example) is needed after the test and interview, it can be many months, or longer, before IRCC is back in town for the next oath ceremony.
Some itinerant service clients are given an option to travel to the local office for an event, at their own expense, their own arrangements, when it will be a particularly long wait before itinerant services are provided more locally.
Nonetheless, given the huge geographical area of Canada, there are bound to be some applicants at very long distances from even the closest location where itinerant services are provided.
You can read some of the IRCC information about itinerant services at the following web pages:
http://www.cic.gc.ca/english/contact_us/offices/itinerant.asp
http://www.cic.gc.ca/english/resources/tools/service/itinerant.asp