It’s a derivative of the Spanish phrase “Buenas Notches”. In the 18th Century there were regional competitions sponsored by various Spanish Grandees where men competed to climb a pole provided with cuts for foot gripping, with the aim of reaching the top notch. The reward for accomplishing this was typically a prize draft animal so competition was fierce. The ability to gain a foothold on these top excisions in the pole was so highly regarded that they became known as “Buenas Notches”, and this term is still in use today. This became “Top Notch” in the US, and was first used in advertisements for imported Spanish riding saddles
Umm any sort of a physical scale be it a yard stick, weight scale, whatever will need to have equally spaced indications along it’s length. While in modern times we can just print those on, before the easiest way to mark it would be to make notches. Any kind of system of linear measurement of anything would have a top notch or the top mark. To me this is more obvious than say “top shelf liquor”.