Unlike states, provinces don’t really “claim” land; the land (and especially the water) is all Canada’s, i.e. “Crown land.” The provinces as legal entities are just legislatures that set provincial law for the provincial residents (i.e. the Canadian citizens who are registered as residents of said province), rather than for the geographic area those residents happen live in; and courts that uphold laws for those residents; etc.

Laws about what you can or cannot do on Canadian soil (like, say, use marijuana, or go camping in a provincial park) are all either purely federal, or purely municipal; it’s not a power of the provincial government to make those sorts of laws. (Provinces can restrict or force municipal laws on the municipalities whose residents are all their provincial residents, but that still leaves you free of provincial stricture on unincorporated land “in” that province.)

Another way to think of it is, you could theoretically be a resident of one province (i.e. a person who got their ID from that province’s printer, who pays their provincial taxes to that province, who gets welfare and healthcare benefits from that province, etc.) while actually living 100% of the time in another province. Because the provinces are the sets of registered residents, not the places. (It doesn’t work out this way in practice, because all the provinces have laws that say you must spend at least six months of the year in their federal geographic boundary [see below] for them to consider you a resident of them—but that’s just a policy they each all have, and if in theory a province didn’t have such a policy, you’d freely be able to do this.)

Each citizen of Canada is a resident of one province at a time; and that province decides which riding a given provincial resident belongs to, using loosely-geographic rules. But ridings have nothing to do with geography per se; they’re just political buckets. (Imagine if, say, PEI ceased to exist due to flooding, and all its residents were evacuated to other parts of Canada. In the short term, the PEI provincial government would still exist; PEI residents would still be PEI residents; and each resident would still get assigned a riding. But probably the ridings would become something more like “which province you evacuated to” or something.)

Now, mind you, there are geographic boundaries between entities called “provinces” as part of federal law, but the legal provinces (i.e. the provincial legislatures, courts, etc.) and the federal-geographic provinces aren’t 1:1. The geographic boundaries of federal “provinces” have nothing to do with where one province’s ridings end and another’s begin. Rather, the geographic provinces are entities for the sake of federal laws that need to make a distinction that some part of some law only applies within a particular geographic area (usually Quebec vs. Not-Quebec.) These laws were lobbied for by the Quebec provincial government, among other interested parties—but they had to be put into law by the federal government, because it’s the Crown, not the provinces, that attaches metadata to any particular subdivision of Crown land, and then attaches laws to said metadata.

(Fun note: where I live in Vancouver BC, there’s a part of the city, “Granville Island”, that’s Crown land, i.e. isn’t considered to be a geographic part of British Columbia as far as federal laws concerning British Columbia go. This creates interesting situations: the people who live on Granville Island are still BC provincial citizens [because of the way BC defines its residence policy], so they still vote in provincial elections and get provincial benefits; but they don’t have to obey any of the federal laws concerning BC federal-geographic residents, because of the way the federal government defines geographic residence. I believe this means they pay different taxes, even. However, Granville Island is still a part of the City of Vancouver [a municipality], and the province tries to push them around by getting the municipality to force bylaws on them that replicate provincial law. It doen’t work very well! Granville Island is basically its own tiny little land-locked territory.)