Great experience to share! Women red-card men all the time - you see it the most in a divorce situation, where the same woman who used to "love" a guy unconditionally is now going after his guts. Red is most often played for survival when it comes to women - so when you see this happening to you, a woman just did something to survive, and possibly at your expense.
You can't let the bad experiences define your relationship to women - they'll just avoid you completely in that case (also survival instinct and strategy at play). The only thing you can really do is learn from your mistakes and not repeat them.