I'm confused by your confusion. The manual is totally clear and says everything you said in fewer words.
Undefined behavior means, in this case, adding a new key/value pair while traversing a table with `next` doesn't produce an error, but is incorrect because it may produce unpredictable results that are not defined by the language. There is nothing overly magical about it and the reason for this is self-evident — tables are not guaranteed to be stable and `next` cannot know the context in which it is called.
It is true that Lua's reference manual is very sparse. I find myself needing to read it with extra care because it almost (?) never repeats itself. That's a style choice, but it isn't wrong and there's nothing missing in the description, as written.