A habitational surname, from Old English.
"The genealogist traced the family's history back to a local farmer who adopted Sanford as his habitational surname from an old English estate."
Sanford is a reduced form of the name Sandford. It entered English as a shortened version of that original compound surname.