When you are in school, why do people find it weird to date someone 1/2 years older/younger, but when you marry someone 5 years older/younger it's normal?
Because people in school are younger. A 15 year old dating a 13 year old is seen as disturbing as they’re in different stages in life. Whereas a 21 and 23 year old marrying is seen as okay as they’re both adults in the same stage in life.
General view is that you're zooming up the maturity ranks dead fast when you're young. The average 15 year old is supposed to leave the average 13 year old well behind in that regard. In practice of course it doesn't work like that for every case but people can't get what usually is the case out of their heads, and thus one appears weird. Once you're well into adulthood tho, any 'maturity' gaps tend to close quite a lot, so age gaps tend to be less problematic.
Also if you're 16, you're above age of consent, so trying to get with people that are under such age is bound to raise some eyebrows.
maturity levels are different, different places in life, ones just beginning to learn new experiences whereas the other has already gone through it all and probably wants to settle down