Deliberate abuse and misuse of a product is not covered under any normal warranty, and overclocking the CPU could fall into that category depending on the specific warranty (some CPUs could not be overclocked for that reason so it was irrelevant).
User software is another matter altogether. Users could always install whatever they wanted.
It seems you are not old enough to remember that the PC was originally designed to be modular and flexible and that applied to both the hardware and software.
The whole raison d'être from the S-100 bus of the 1970s and the IBM PC† of the '80 was to provide users with a computer system that was flexible and that users could adjust and alter to suit their needs. This meant that users were actually required to alter the configurations of their PCs. No one would have questioned such action, it was considered completely normal.
Moreover, warranties took this into account and it was a normal procedure to add RAM, disk drives and video cards etc. without voiding the warranty. What's more, one could even upgrade the CPU (and if necessary its clock speed) and the rest of the hardware would still remain in warranty—that's why CPUs until recently were 'socketed' and not soldered into place. Of course, the third-party CPU wouldn't be warranted—not on the PC's warranty anyway.
What you are referring to is a sleight-of-hand by some sleazy ratbag manufacturers to change the PC from an open system and make it proprietary. Any system administrator or corporate buyer (at least until recently) would have objected to any clauses in the warranty that would have forbidden modifying equipment as mentioned. I know, I was head of a government IT department for years and contacts that included such punitive warranties would never have been awarded—they would never have passed my desk. Not that I ever saw any mind you. (BTW, there some were warranty claims, altering the equipment was a non issue.)
What we are seeing now (and this whole discussion) is about reclaiming the open nature of the PC—and our computing equipment in general, our phones, etc.
Fortunately, the Right to Repair movement and the Right of Ownership—people like Louis Rossmann and iFixit—are beginning to make inroads into keeping these sleazy carpetbaggers in check. As we've seen Right to Repair laws are getting enacted.
† The original IBM PCs had full service manuals that included electronic circuit diagrams and even the BIOS source code! To suggest we weren't meant to alter things is sheer nonsense. (I still have my copies of these manuals.)