I knew professors that slacked around all day long. In principle, you can work only one month per year writing an excellent research paper. And of course, planning your lectures during the rest of the time.
This is not my experience with the newer generation of professors in STEM.
Writing that paper means making getting funding and that means networking (giving talks, creating/maintaining collaborations), participating in inter/intra department grant writing, managing students to produce the work, etc.
Of course you could write an amazing research paper but more often than not it won't go to an amazing journal unless you have positive connections in the field (-ie potential reviewers and editors).
Papers in good journals -> Easier to get grants.
A major part of the tenure packet is grants and awards.