That only makes sense if you assume that marriage is a purely financial thing. It has lots of other aspects that have nothing to do with money that a lot of people dislike.
It is a discrimination since not everyone will find somebody to marry. And even if everybody could marry, it still is a discrimination towards not married people.
Marring for the purpose to get tax benefit and oder advantages is a sign of discrimination, because they are marring to get advantages in society.
Society is full of discriminations that people have normalised and so they don't see it as such.