Please note that I may be wrong, but I'd like a sanity check to make sure I'm right. The variable-length quantity method of storing numbers in MIDI files is very unusual and takes up more space than necessary...what were they thinking?
Rest assured, you are wrong.
You appear to be confusing the
length of the payload with the payload itself. Read the spec more closely or look at what @Bavi_H posted. Every meta event has a length value that tells you how many bytes the payload consists of. Knowing the format of meta events means you don't have to know what a meta event is to be able to successfully read it. You process events that are important to your application and ignore events that are not.
What they were thinking is that the length value takes up the
minimum number of bytes necessary to indicate the payload length, which very successfully saves space.