Yes, it matters that the distribution shows up on the Form 8889 for the individual to whom the distribution applies. Visit this HSA section, indicate that both spouses have HSA, then edit the Form 1099-SA and select the correct "This 1099-SA is for" radio button to indicate the individual from whose HSA that distribution was made.
Forms 1099-SA report distributions, not contributions. Contributions are entered separately and must also be associated with the correct individual so that they appear on the correct individual's Form 8889. The part of Form 1099-SA that reports contributions (Part I) is separate from the part of Form 1099-SA that reports distributions (Part II).