I think Robert E. Lee served in the U.S. Army during the U.S. - Mexican War in the late 1840’s. Maybe that’s the connection.
Or perhaps a Southerner re-located to California at some point and was in a position of authority at the time the school was built and subsequently named? Who knows.
The more likely explanation. You can take the boy out of Dixie...