Replied meanly to the wrong person

So today I was with my homies at college and a girl approached me twice once indirectly like going past me and then talking about us homies (we were doing maths while college was hosting a program) and after few minutes she came to me directly and asked why I was doing math and...I Don't know about other colleges but in our country there is this culture of always reply rudely or meanly to every question (never ever reply seriously or 🤓) and I out out habit replied "because I feel like it" and it was visible in her face that I hurt her but it was too late she already left 😵‍💫 I'm feeling a weird mixture of embarrassment and sadness