Wrong targeting - kicking the cat when you fail a test - is universal. You're having a bad day and who walks in the kitchen (hubby or wife) and they're the problem - they didn't clear the dishes.
It's a way of deflecting anger, sadness, despair and pointing it at someone who you know (makes it safer) or a complete stranger (what are they going to do about it).
You took the right road, high or otherwise. You didn't engage. Anger LOVES anger directed at it - I learned that long ago. Safe journey.