Question for non-binary people

I've seen people call themselves gay or lesbian as a non-binary person, and I was wondering how is somebody without a gender gay or straight? What defines that for someone who doesn't believe they have a gender or align with one?

No hate, just always been curious and I tried to ask a non-binary person before and they got mad at me when I explained why I was confused that they were calling themself gay.