-
Many factor involved, could be simply folding the bike, could be hit when in storage, could have been pressed onto something for a while, etc.
if it wobbling like a cassette it sound like something that can be trued rather than replaced and it's not abnormal for a chainring to be slightly out (especially entry level chainset/chainring), unless your cassette is worryingly all over the place.
I found my front chairing bent. Replaced it, but no idea how it came to be bent?
It was just slightly so, you could see it wobbling just like a normal cassette would.
LBS stated it was hit, but it hasn't. Weird.