Why do modern JavaScript Frameworks discourage direct interaction with the DOM

In dealing with JS frameworks like AngularJS, Angular, and React, I’ve observed that directly interacting with the DOM is discouraged, and can often lead to bugs, if you ignore the warnings. When I say “interacting with the DOM” I mean using document.getElementById('myElement') and similar methods to do some manipulation or read values from the document.