If you want to do some reading that will help put you to sleep, Statscan has info explaining what makes a CMA, and explains forward and reverse commuting rules, etc.. Of course of you're a stats nerd, you might get hard on instead...either way it's worth a quick look.
www150.statcan.gc.ca
What's interesting is that under StatsCan's rules, Foothills County should currently be part of the Calgary CMA -- except that it isn't already; that's literally the only reason.
Long story short, the starting point of a CMA is a "population centre", which is a reasonably continuous and dense-ish (allowing for parks, industrial areas and so on) settled area. Edmonton, St Albert and Sherwood Park are all in the same population centre (but not the acreage belt in Strathcona County around Sherwood Park, since it's not dense enough). The Calgary population centre should include Heritage Pointe, which has enough density and is close enough to Legacy and the rest of the city. If the population centre at the core of a CMA stretches into multiple geographic areas (municipalities), then they're all included, which would mean that Foothills would be included because of this.
But -- here's catch-22 -- population centres can't cross CMA boundaries. So Heritage Pointe is defined as a separate population centre, and the Calgary CMA stops at the city limts. If someone broke into StatsCan's offices and destroyed the records of what was a CMA so they had to draw them from scratch, the Calgary CMA would include Foothills.
-- start very nerdy rant --
I've worked with multiple census agency data, and there's always a tension in census data between historical continuity and current relevance. It's valuable to be able to track changes in populations, economic conditions, and so on. Are places growing, are people leaving poverty, that sort of thing. So you don't want to change all the boundaries all the time, because it makes those comparisons impossible. But the census boundaries should also represent reality on the ground; both historical comparisons and current information is not useful if it doesn't represent what's happening in the real world.
Other places redraw their boundaries on a semi-regular basis; Australia did this in 2011 changing from their 1984 system. (There are always updates; this is a wholesale revision). Statistics Canada doesn't. It's boundary definitions are sacrosanct to a preposterous degree.
Downtown Edmonton has a census tract boundary drawn based on railroad yards that were dismantled 30 years ago. There are apartment buildings there that cross census tracts; residents living in different census tracts sharing the same garbage chute. You can be in a class at MacEwan University, and have your professor writing on the whiteboard in a different census tract; when the Oilers are on the powerplay, Draisaitl lines up in one census tract if it's the first and third periods, and another census tract in the second. Similarly in Lethbridge, you cross a census tract inside Park Place Mall going between the Winners and the food court.
It's not as bad in Calgary, but there's still problems. Lower Mt Royal and Cliff Bungalow are high-density communities, mixed income with some low income (especially in the older walk-up rental stock) and some gentrification in newer multifamily. Upper Mount Royal is richie-rich low-density houses. They're very different, and should be split. Yet Lower Mt Royal and Cliff Bungalow are in the same census tract as the northern half of Upper Mount Royal (to Frontenac/Hillcrest Aves.). Why? Because that was one of Calgary's 11 census tract boundaries drawn in the 1951 Census, and someone might want to compare something about the current population there with the population that was there in the 1951 census, perhaps how many residents of the "Asiatic Other" ethnicity (actual category from 1951 census, and not the least offensive one) there were and are. Or chart the last 65 years of trends in the employment of occupations like newsboys, bootblacks and software engineers.
-- end rant --
Anyways, all the bull about census boundaries aside, because StatsCan isn't likely to change their ways anytime soon, the actual problem is that CMAs can't have any holes in them. So it's not just Foothills that has to come, it's Foothills, Okotoks, High River, Black Diamond, Turner Valley, Longview and the Eden Valley reserve that as a group have to have 50% of their workers working in Calgary. Foothills is around 60-65% working in Calgary, Okotoks is around 50%, DiamondValley is around 40%, but High River is only 20% or so working in Calgary.
In 2011, the whole area was 49.3%, within 200 of the cutoff. In 2016, it was 45.7%, over a thousand short. The biggest reason for the difference (other than random sampling noise) is that more Okotoks residents work in Okotoks. I don't know what 2021 will bring; on one hand, employment in downtown Calgary has dropped so those long-commuters will be hurt. On the other, there might be more long-distance remote commuting. On the third, a fair amount of the local employment in places like Okotoks is retail/service, and the employment in those sectors has been decimated.