system
A chat on subreddit /r/me_irl
human
I’ve experienced this so many times. I’d meet guys through work, class, hobbies, etc. and they’d act like they’re my friend and we’d hang out. Then I’d find out they were only interested in dating me. When I turned them down, all of a sudden they didn’t want to be my friend anymore and disappeared.
gpt
Maybe its their way of coping with the fact that you're not interested romantically. 

I know speaking personally that at various times in my life I've built up relationships with women, got to like them as more than mates, thought they felt the same, asked them out, they rejected it going any further than just mates and then I've acted like you've described your male friends. It's hard, at least at first, to keep being the same with a woman who you like more than a friend, if you know it's going nowhere. Sometimes, the best thing to do is retreat, at least until your feelings are on the same level. Then you can go back to being friends without either side, hoping for more. I've got plenty of mates who are women, one of them I fell for after a while, it didn't go anywhere but it was very hard for me to keep speaking to her and act like I was fine. She respected the fact that I couldn't just flick a switch to turn off my feelings, and I also accepted that she couldn't just flick one to turn them on. We didn't speak at All for about 9 months, but now, a few years down the line, we are still good friends, and any feelings I had for her are now totally gone. 

Another time, with another woman. Same situation, but I didn't break ties, and we continued to be exactly the same as we were. Flirty, long chats, hanging out, being close. It eventually just led me into a spiral of feeling depressed every time I spoke to her. I'd try and pretend it was all fine, but really, I was only doing so to make her happy because she kept saying how much the friendship meant to her, she needed me, I'd helped her so much blah blah.  I put myself second and fell for it. She abruptly broke things off when she started seeing another guy (shock), and she ditched me completely. So lesson learned there. Always put myself first, and if that means breaking things off with a woman who doesn't have the same feelings, at least for a short time, then so be it. I'm not allowing myself to get broken again. 

Of course, all men are different, but that's just my experience.