No you imagine it's a compliment, but that doesn't mean that it is. It's based on all women's personal experiences of constantly being bothered by strange men who want to access their bodies and demand that they turn attention to the speaker. Have you ever watched this clip of a woman walking around New York being literally bombarded by "compliments" from men. It's predatory, entitled, and just plain gross. A compliment is a sign of respect - that shit is just trying to get in her pants and if he respected her, he'd try to get to at least know her as a person first, not bother every random woman you find attractive on the street.
First off, why do you imagine that any woman cares about the opinion of some random strange man about her appearance? It stems from the belief that women exist for the pleasure and enjoyment of men and that they want nothing more than to exist for the male gaze and male approval. Not true...
Have you ever been to a mall that has those kiosks in the halls and hawkers try to grab you as you pass by and sell you their stuff? That's what it's like to be a woman, only the thing that men are trying to force you to buy is their dick. They won't let you just go about your business without constantly trying to push their dick on you - without even once caring about what you want, or even that you have thoughts that are separate from theirs.
With very few exceptions, compliments should take place within existing interpersonal relationships, not to be made to strangers, particularly to women you don't know. Men think the most important thing about a woman is how she looks, so they focus on that, but what this ends up doing is reducing women down to nothing more than an attractive face or body - which is pretty dehumanizing. If you want to impress a woman, compliment her on something that isn't about her face or body. Even complimenting her outfit at least acknowledges that she had the good taste to select it, but better yet, compliment her thoughts, achievements, interests or something else about her FFS. Treat her like a human being, not an attractive sex-dispensing machine that you wish to access.
Continually projecting your ideas about what you imagine a woman should want (when it's not what she actually wants) is just self-serving and nearly always going to be off base. Then being mad at her for that is just more of the same.
Read this for more about why this shit isn’t actually a compliment.