There was no pre-existing trait called intelligence to measure.
The was just a vague idea that some people might have a bit more of some underspecified general quality but there never was any good idea what exactly that might be. So making a test that measures something correlated with outcomes that people associate with this nebulous pre-existing idea of intelligence is honest and fair stab at something that eluded our grasp for millennia.
Intelligence as people were talking about it before we created intelligence tests is something like atoms of Democritus. And IQs are atoms as we mesured them today.