Because the IRS requires it.
When a married couple files separately, they automatically disqualify themselves for deductions they may otherwise qualify for if they file joint. When a married couple files separate, if one itemizes then both must itemize; even if the itemized deductions of one of you is zero.
If one takes the standard deduction, then both must take the standard deduction even if the itemized deductions of one of you is higher. Therefore, the IRS requires the SSN of the spouse when filing separate returns, so they can cross reference to ensure both claimed the same.