It's really just the time periods they were primarily used in. Your majesty was also typically used just for royalty where your highness could have been used towards any superior of the clergy, noble lords or royalty.