Sure. A very common pattern among my friends was that, when they had or were planning to have kids, they moved out of Manhattan to Greenwich or whatever. (This was a while back so the outer boroughs were probably relatively less interesting relative to the commuter rail destinations.)
But, at least in my bubble, when people are talking about the high CoL of NYC, they're mostly talking about living in the core.
The Bay Area is a bit unusual in that compared to a number of other expensive cities, it's hard to really commute out of the expense unless you have a really long commute. The East Bay comes closest I guess. By comparison, I live in the Boston area but you can get out to many suburban or even relatively rural towns within an hour. (Historically that's where almost all the computer industry jobs were anyway although that has changed somewhat.)