Something can be both a compliment and sexist. Especially if it's a compliment that has a lot of baggage and assumptions.
There is a history women only being viewed as good for marriage and babies. It used to be seen as unusual & unnatural for a woman to not want babies and marriage. It was seen as weird for a woman to want to focus on carrer rather than marriage. Also they were viewed as "nice to look at, but unable to do any real work". Things have gotten a lot better, but there are still bits of this attitude around.
If you compliment a woman based on (a) getting married and
(b) physical attractiveness, you are slightly re-inforcing that meme. You are also signaling that you might be the sort of person who thinks the above, or that you support the above attitudes.
There is a history women only being viewed as good for marriage and babies. It used to be seen as unusual & unnatural for a woman to not want babies and marriage. It was seen as weird for a woman to want to focus on carrer rather than marriage. Also they were viewed as "nice to look at, but unable to do any real work". Things have gotten a lot better, but there are still bits of this attitude around.
If you compliment a woman based on (a) getting married and (b) physical attractiveness, you are slightly re-inforcing that meme. You are also signaling that you might be the sort of person who thinks the above, or that you support the above attitudes.