SHA…
This naming was introduced by NIST (see https://csrc.nist.gov/Projects/Hash-Functions) way back in 1993 during SHA-0 standardization efforts (which ended in SHA-1).
SHA stands for Secure Hash Algorithm; while the -1, -2*, and -3 parts can be regarded as a sort of version number. The higher that number, the more recent the hashing algorithm is.
Therefore why SHA-3 is still prefixed with “SHA” despite the fundamental difference in its construction?
When it says “Secure Hash Algorithm” on the package, it doesn’t matter what kind of hash algorithm NIST puts in there, as long as it’s secure. That’s why they chose the naming while embracing standardization towards Federal Information Processing Standards.
A word about MD…
Just to be sure you’re not stepping into a potential pitfall: note that “MD” as used in MD5 does not stand for “Merkle–Damgård”. Instead, it is short for Message Digest; again with appended numbers which can be regarded as a kind of version number.
To make it complete, maybe I should also point out that MD… isn’t a NIST naming thing.