Welcome to the wonderful world of autism, where all kinds of messed up stuff happens, and we don't understand why. If you ask an NT why, maybe they'll just say something about "bad vibes." Maybe they'll mention something specific that may or may not be useful in the future. Maybe they'll make up a comfortable lie. Or maybe they'll tell you that you know exactly what you did and bug off. (I've had that one a few times.)
I think a major problem we have is the inability to distinguish between friendly acquaintances and friends. I have had a few of the former, and in 68 years, I can count the latter on the fingers of one hand.
A friend is someone who genuinely enjoys the pleasure of your company. There's a bond there because simply having you there is rewarding.
A friendly acquaintance might like one aspect of your personality or only in a particular situation or only at a distance. Too much "you" and it gets annoying. Or they might just be a generally friendly person towards everyone. Because of neediness, we tell ourselves that these are friends.
I've had a couple of people who wanted to be my friends but I just couldn't be a friend back. We lacked shared interests and had uncomplimentary personality types. No pleasure in their company. They felt very needy and clingy. I was barely keeping my own head above water and couldn't spare the energy. So I kept them at arm's length. Possibly a mistake, but probably necessary, given what I was going through at the time.