The question mark is ultimately derived from the perceived musicality of medieval Latin questions.