Let me try for an "it depends" answer if I can. There are a spectrum of edits available to be done on any particular question. '
At one extreme, an unclear and poorly written question is refined and expanded (by the OP or by others, perhaps directed by comments) until it becomes a clear and well written question. In some cases the edits are done after the question is answered and accepted - kind of "oh, if you like that answer then I can conclude that your question was in fact blah blah blah" and in others the editing is necessary for the question to even get any answers.
At the other extreme, a question like "what time does the Eiffel Tower open?" is edited into "what time does the Eiffel Tower close?" after the poster realizes that they won't be able to see it early in the morning and start wondering if they can see it in the evening instead, and then edited again to "what bus/train should I take to get to the Eiffel Tower from [wherever] in the evening?" as another thought occurs to the poster.
Stack Exchange as a whole is clearly in favour of the first kind of edit. See Help Center > How does editing work? where it describes edits that make a post clearer without changing its meaning, and so on.
The second extreme are nicknamed chameleon questions and there are many posts on meta that talk about how awful they are and how to deal with them.
Edits that fall in between these two extremes are more or less acceptable depending on the extent to which they mess with the meaning or invalidate existing answers. The actual behaviour that SE objects to is invalidating answers, not editing itself. The same could hold if a mere comment on a question from the OP clarified some omitted detail (like what programming language is being used) in a way that made all the existing answers useless. Someone editing that into the question is not the culprit now, rather the OP who forgot to include that before answers were added is responsible for the mess.