It is a title, afforded any noble higher than the speaker, and it emanates from the hierarchical social system of the Middle Ages. It’s a form of address for a man. The feminine equivalent is Ma’am, a contraction of “Madame" which is French for “My lady”, brought into English after the Norman Conquest of King Harald in 1066 at the Battle of Hastings.