That would be project specific surely, and not a generalisation.
The history of technology used and the history of modern animation are the background to this.
In the early days of CGI was used sparingly because the work flow for traditional 2D animation was already set up and the labor required was already trained for it and available.
CGI in those times was very expensive in terms of hardware and software and the people to both program and operate them and support them.
When it was new, it was like a new toy - you want to take it out and play with it as much as you can - showing off the latest developments, but if its costly, as it was, then you confine it to sections of the movie that would either benefit from it visually or make sense cost-wise or show off the new technology in a way that did not look as good or was always very hard to achieve traditionally.
Hard surface body types - that is structural type objects, like buildings, vehicles, etc were traditionally difficult to get consistently right if all angles were being shown, so CGI would have been a natural benefit there.
Anything organic, like people, continued to be better portrayed using traditional techniques, and this persisted for quite some time.
Anastasia was released in 1997, production would be around 2 years given the information regarding building of the studios, contracts, writing and casting.
When I was looking at CGI technology in 1995 a lot of it was still dependant on very expensive hard ware running very expensive software and would take a long time to render.
The desktop 3D revolution was under way back then, but it was still very expensive and slow back then, so you had to pick and choose where you were going to use it without blowing your budget.
CGI animation was never ever random, it was far too expensive to be that.
Why do animators change styles like this for isolated scenes?
Unless they are in charge, ie. Directing, they do not get to make that call, they are hired to do something that has been decided already.
I notice you picked out all of the scenes that have non organic parts animated in them: early CGI was ideal for that sort of animation, whereas to be done by hand, and look convincingly solid, would have been harder.
By comparison, to do characters, like faces, was incredibly hard to do in CGI and very expensive and time consuming to match traditional hand drawn techniques, so those parts took a long time to develop.
It sounds like you have an idea that yesterdays animation was produced much the same as it is today, which is not really the case.
The world of animation production has moved on quite a bit since then.
Regarding:
the gate of the air temple in Avatar: the Last Air Bender.
Is it this one?:
From my position, that is easy - it would have taken longer to animate those many parts by hand - making it in 3D was quicker.
I do note that the door parts seem quite low-detailed, which probably helped with the jarring against the 2d animation, which leads me to think thus:
Especially with hard surface body objects, in this case a door with moving parts, it can be easier for an animator to reference the animation timing, positions and angles if they have a physical guide to work from (Toy Story, 1993-1995 would use physical clay models as the basis of their models, for example). If it was made in 3D for that as a guide, they may have thought: we are on a tight schedule, tight budget, effectively the door animation now exists, lets just use that and move on with other more labor-intensive tasks. It would certainly not be unreasonable to consider that - corner cutting where you can is pretty standard.
Alternatively, but closely related, it may have been part of the animatic - preproduction in animation is perhaps even more important than in live-action: you want to get all the timing and layout correct before production so that no frames and no time or labor and therefore money is wasted, and so an animatic is produced that sits in-between the process of storyboarding and actual production of the final frames, sort of a low-resolution, rough-looking, version of the final film. And again, perhaps to save time and money they dropped it in.
The other option is that it was identified early on as something to animate in 3D, to relieve the animators, but there was not enough time (or money) to render it properly. Elsewhere there are references to having a very small budget on a very tight schedule and wishing to do parts in 3D because doing it by hand was such a nightmare and would have been much easier to produce if it had been in 3D, but they were not able to.
And therein lies the rub really, CGI is often written off as rubbish, but often times it is not that the CGI is rubbish 'because it is CGI' but rather it is that a whole host of other factors behind the scenes is what caused the quality of the CGI to be deemed rubbish.
Unfortunately many people will not ever see what goes on behind the scenes to appreciate what was intended and what finally ends up on the screen.