You would never suspect they once made some of the world's finest test/scientific equipment.
They sort of still do!
It's just HP and HPE split up. HPE took all the nice enterprise stuff, plus the supercomputing business (they own Cray). HP took the consumer stuff, and proceeded to milk as much as they could.
And great technologies as well, HP-UX (Vault was one of the first UNIX containers), Modula-3 (Olivetti/Compaq became part of HP), ...
Rome once ruled the greatest empire on earth. Vs. look at the last few centuries of Italian history. Regression to mediocrity seems an inescapable part of human endeavor.
I'd argue that their excellent test equipment and printers allowed this to happen; anyone who made generic shit would have been quickly killed by all the blunders they made.