The reason trans people are trans is because of gender dysphoria/euphoria. The specific definition of gender dysphoria is:
“gender dysphoria
noun
A persistent unease with having the physical characteristics of one's gender, accompanied by strong identification with the opposite gender and a desire to live as or to become a member of the opposite gender.”
Euphoria is just when you feel happy because you’re recognized (by yourself or others) as the gender you want to be.
Euphoria is enough for some people transition even without dysphoria, but for a lot of people dysphoria is a really pressing issue.
While some people feel it mildly, like avoiding looking at themselves in the mirror (due to unwanted sex characteristics), others feel it very strongly and experience grief and pain over it, some even going as far as to hurt themselves over it (like cutting themselves).
No actual trans people are identifying as the opposite gender simply for attention or for fun, and implying that they are is very demeaning and rude.
I will also say that it’s unfortunate what people will say to make trans people sound bad. While change is a sometimes scary thing, it’s not productive to shut it down. It’s important to understand it and talk to people who have experienced it for their perspective.
(At the very least bigots could talk to a trans person before hating them :/)
Thank you for asking!