Using sarcastic comments and similar snide remarks is a common way of showing that the person is just trying to be friends with you. It does not mean that they are doing it on purpose. It is the same as if someone you smile at does not return the smile, and you automatically assume that they are rude.
What are snide comments?
Snide means insulting or contemptuous in an indirect way. If your friend is wearing too much purple eye shadow and your other friend whispers to you, “What? Was she in a car wreck?” that's a snide comment. Snide remarks are the kinds of things people say with a sneer on their face.
What causes snarkiness?
Why are people snarky and mean? I've found that it's often because they have ego and self-esteem challenges, and are addicted to putting others down so they can feel better about themselves.