This is all I could find here on chess.com, but I bet you could google it and find something on the history...
Castling only involves the king and the rook (no other chess pieces), and it is believed that it was invented around the 1500s in order to speed up the game.
Just why can a king move two spaces