The pro's for separating code and markup are thought to outweigh the cons, but there is nothing forcing anyone to adopt this standard. As you may or may not know, re-usability and maintainability can go a long way when working with a large webpage. If I am trying to massively overhaul my website while maintaining the same use-cases, the javascript is probably not going to change, but the HTML and CSS will, and herein lies the benefit of separation.
That being said, if for some reason you would prefer a button's behavior to be more apparent in it's markup, scripts can be used in-line with identical functionality. If your concern is linking to an external document (which is also done as a step of simplification of large projects, not obfuscation) it is totally acceptable to style an HTML page from internal <style> tags.