I think the reason that 'playing to learn' seems so at odds with 'playing to win' is that they require you to shift your priorities. Playing to win requires playing at your absolute best, utilizing your most consistent options and minimizing risks. The idea is that you are not growing, but executing everything you have practiced up until that moment, making minor adaptations in response to your opponent, more so than fixing issues in your own play. And this is definitely the mindset that you should have when you're in a tournament setting.
However, this mindset leaves little room for experimentation and taking risks, which are often staples of the learning process in smash. How often do you dive offstage to challenge your opponents recovery? Each recovery has various hit boxes, timings, and mix ups to learn, and successfully edge guarding often requires many, many, many failed attempts that often involve losing your own stocks. You have to sacrifice success in the present for future success in this scenario, as the reward for mastery of this technique is easy early stocks on your opponent. Who cares if you win 70% of your friendlies or have a big GSP if you can never step up to challenge players better than yourself.
Your own character may have risky techniques that requires basically throwing games to master. For example, my current main Pikachu has a myriad of recovery options that make it very easy to make it back. However, as I've identified that my opponents were catching on to the fact that I often would first quick attack above the stage then to the ledge, I realized that I had to work on my more difficult, yet safer angles that involve dipping beneath the stage with my dash before snapping up. This latter technique has caused me to lose many stocks at very low percents (because when I up B downwards I often fail to input my second direction), yet I also know it is a safer option in the long term once my execution becomes more consistent.
One other more extreme version is an Ivysaur technique I have been working on. Ivy can be very vulnerable when attacking from the ledge, and I realized I needed a new option. I noticed Leffen was finding a way that he could very safely attack opponents attempting to ledge drop by dropping down off ledge, pressing up b, then quickly pressing down on his control stick (allowing his up b to extend beyond the ledge) and then angling at his opponent. This technique is very execution heavy and failure has meant death or forcing myself to switch to Charizard who fares even worse in these situations. Yet I attempt this technique all the time in games because that severe disadvantage that a failed execution represents now will provide me an important ledge play advantage in the future.
Some games I go into thinking "I want to focus on my RAR bair approaches" or I tell my friend "play the campiest Ness of your life, I need to work on getting around projectiles". As Pokemon Trainer some games I will play as only Charizard as this provides much more learning in more diverse scenarios than I would receive had I continued to reserve Charizard only for finishing stocks lasting 150%+ like I do when I play to win. I often find that playing with infinite stocks vs a friend is the best method for this as it is much easier to escape the fear of death and being beat to take the risks you need to take to elevate your gameplay.
And lastly, playing to win all the time creates an expectation that you will always win, and this can lead to an aversion to seeking out the best possible players you can, and taking opportunities when playing with them to adapt rather than attempt to dominate. When I took melee seriously I used to grind against some of Canada's top players in Ryan Ford, WeonX, and KirbyKaze, and I would be lucky to take a single game off of them after 6 hours and them trolling on a character they never play. KirbyKaze once got frustrated with me that I was not implementing the advice he game me about how I should be wavedashing out of shield because it is safer and adds a new mix up to my defensive options which he was easily exploiting. I told him that I needed time to adapt my playstyle to incorporate it, that all it does is make me make more errors, making me lose even harder. But the truth is that excuse was bull****. Is there any difference between losing 200 games by being 3 stocked vs 2 stocked because now I was SDing? Not really. I should have experimented and tried different things because what I had mastered was clearly not working. But I was determined to always play my best, and to push for any possibility that I could perform even slightly better than I did the previous game. My play to win attitude had me bashing my head against a brick wall over and over, but had I taken the opportunity to play to learn I may have grown so much more.
TLDR: You're asking the wrong question as winning has nothing to do with learning, and actively prioritizing winning comes at the cost of risk taking and experimenting which are more valuable for long term growth. Take the L for today so you get the W tomorrow.