The central government of Canada is not in Ontario. It's in Ottawa. It's similar to the District of Columbia.
I’ll take your word for it. However, consider Wiki,
Unlike capital districts in some other federal countries, such as the District of Columbia in the United States or the Australian Capital Territory in Australia, the National Capital Region is not a separate political or administrative entity. Its component parts are within the provinces of Ontario and Quebec.