"using namespace" in header files is bad practice

I’m really baffled that this used and thus shown as (presumably) good practice in so many of the C++ course videos. For instance in Ultimate C++ Part 3: Advanced - 5- Overloading the stream insertion operator:

This is bad practice and should be avoided.

Also see for instance: "using namespace" in c++ headers - Stack Overflow

You are absolutely right @brokkolibri .
This is a bad practice that should be avoided.

Having said that, you have to look at this from a complete beginner’s point of view.
I believe Mosh was only trying to keep distractions away from new learners and to simplify the code as much as possible, so it is easy to contemplate.