Jesus is descended from King David via Mary which makes Him a legit heir. . .also Books of Matthew and Luke has the genealogy. Back then bloodlines very much mattered and were tracked with a fine toothed comb. When people put that sign over His head, they weren't just mocking a 'wannabe', they were mocking a legit heir. . .another reason why Jesus said, "Forgive them for they know not what they do."
Those people who put up that sign, along with the rest of us, got Someone who should've been declared a king killed because of our sin nature.