The answer to this is more regarding usability than it is security.
It's easier for the developers to build a box that does JavaScript, with rules and restrictions in place for what it is and is not allowed to do. You feed that box JavaScript code, and out comes the result of that code (plus side effects).
By implementing a feature like you suggested, you would introduce more complexity into that machine (and more possible surfaces for bugs), as now the machine would not only have to execute JavaScript, but also remember where that JavaScript came from, and what it is allowed to do.
Furthermore, it makes life for developers harder. Imagine typing a simple JavaScript command into your console, and it works, and when you then execute it from a script file, it suddenly does not work anymore. That can be incredibly frustrating for a developer to experience.
And finally, what is the upside? There is not really one. Manual JavaScript execution in a browser is an extremely niche feature 99.99% of browser users don't use. Even developers usually don't do that.
To summarize, this "feature" does not exist because:
- It would introduce even more complexity (and thus more bugs)
- It would confuse many developers
- It would barely have any positives worth the cost