Quite often, people were given mother's maiden name as a middle name, sometimes grandmother's. In the case of illegitimacy, it was a way of identifying the father.
If you add a few generations to your tree, it will probably reveal itself if it is a family name.