I learned chess playing always against a friend that won every single time. I didn't give up. I joined a club and improved. After some months I played again with my friend and I won. That was the last game he played against me. Moral? Not sure. I like to win sometimes, but I don't mind losing most times if that teachs me something.
Playing against someone much better than you sharpens your perception, reactions, everything in a way you can't get any other way. Bring it on!
By the sound of it your intent was to win eventually. You could imagine winning, and with some effort you did win. I think that's subtly different to playing against people who you will never beat regardless of how much effort you put in.
dragontamer's example of Magnus Carlsen is a good one - he was in the top 1000 players in the world when he was 12, and become World Champion at 22. He's intuitively good at chess. The match he played to become World Champion the first time was fascinating because as soon as he could get to the point where the game was outside of what Vishy Anand had experience of he was pretty unstoppable. He's not someone normal players will ever beat. I think most chess players would like to play him because he's famous, but if you met someone unknown with the same level of ability most people just wouldn't play them except to learn. Few people would want to play that sort of person for fun. It just wouldn't be very enjoyable.
By the sound of it your intent was to win eventually.
Eventually we all die. It's fun to play anyway.
In a less philosophical mood: standing against an overwhelming force can be exhilarating. I've felt something like that windsurfing in strong wind conditions.
Down to the specific question, losing always against someone you can't defeat is very good training for winning over others.
I play a fair amount of a regular scale FPS (12v12 max) and it happens fairly regularly that I end up being the last one alive in my team and have to face off multiple opponents.
I don't always succeed but the pure thrill of trying to survive what is usually a virtual death sentence is something really powerful and when successful so exhilarating.
Have you tried BR(battle royale) games? PUBG gets my heart racing too much. I also like that it mixes you in with both pros and amateurs. Not knowing the skill level of the player you are exchanging shots with keeps everyone on their A game.
The learning thing is sort of irrelevant since you can install a program on your laptop that is strategically better than 99% of humans and tactically better than 100% (which we now know through experience is enough to beat 100% of humans, even the ones with superior strategic reasoning).
The part where your friend stopped playing you -- that's something that I just don't understand, on a fundamental level.
My brother-in-law talked about chess for years, I finally agreed to play him, and won both games. He's never brought it up again. It makes no sense to me.
Growing up, I was the youngest, so I generally lost at whatever games we played, and it never made me want to stop playing. When my significantly older brother came back home and stayed with us for awhile, we played chess regularly, and I lost a _lot_. But I kept playing, and when I finally got to the point where I won one out of three, it felt really good.
How much fun would I have missed out on if I hadn't kept playing?
This guy is the most stubborn person when learning something that you can find. I lent him a book on flamenco guitar (that I lost hope to recover :) and he actually run through it and learned to play it like a pro. He's short but won a position as firefighter. Now he improved his English, took a sabbatical and is touring south-east Asia with a backpack.
Probably he was just diving in his next obsesion at the time.
Playing against someone much better than you sharpens your perception, reactions, everything in a way you can't get any other way. Bring it on!