When Social Security was designed, husbands typically provided the sole income for the family, while their wives stayed home and took care of the children and household. That was never true for all American families. However, it was common enough, that lawmakers had to take it into account when planning Social Security.
In such traditional families, the retirement or death of the husband would cause great hardship. As a result, Social Security was designed to protect spouses and other dependents of workers who paid into the system.
Some of those protections do not necessarily make as much sense today, as ProPublica discusses in "How Senior Daddies -- Like Donald Trump -- Are Eligible for a Social Security Bonus."
One of these old protections is something that even very wealthy people, like President Trump, can take advantage of. People who receive Social Security benefits with minor children as dependents can get extra benefits. In the President's case, that could amount to an extra benefit of about $15,000 a year, until his son Barron grows up.
It is not known if the President is getting this bonus or if he is even taking Social Security benefits at all. If he does take it, he joins the 1.1% of people on Social Security who also get this bonus.
When Congress gets around to reforming Social Security, this is the type of old rule it might want to revisit, to see if it still makes sense.
Reference: ProPublica (March 2, 2018) "How Senior Daddies -- Like Donald Trump -- Are Eligible for a Social Security Bonus."