I've never really understood why Sokka was sexist in the beginning of the show. I've heard a lot of people comment on how "oh the live action is going to erase sokka's sexism and therefore erase his character growth!" which has made me think about what Sokka's sexism means to the show.
In the first few episodes of ATLA when they're still in the village, Sokka makes a really big deal about turning little toddlers into 'real men' and making them ready to fight the fire nation. Sokka's treated the Kyoshi Warriors terribly, disregarding their skills because they're girls. While I don't remember it exactly, he also says some pretty sexist things to Katara in E1. Sokka's sexist remarks are littered through the entire first season, but why?
It's because of Hakoda. When Hakoda left, Sokka felt like it was because he wasn't a 'real man' and misinterpreted Hakoda's line of thinking, which was that Sokka was a) too young and b) when Sokka would grow up, he could protect their village. Sokka interpreted it as his father saying that Sokka wasn't a real man and couldn't come. This led Sokka to form very marginalized views on what boys could do. He was so focused on 'becoming a man' a.k.a. helping out his village/fighting the fire nation that his views on his masculinity started spreading towards his opinion on women and what their societal roles were. All of this takes a big toll on Sokka because he's very young and moldable.
However, when he meets the Kyoshi Warriors, his views start to expand. Especially because he likes Suki and wants to please her, therefore subconsciously expanding his own views. As the show goes on, and especially as his sister's bending becomes more powerful, he recognized that there isn't really a distinct margin between what boys/girls can do. You can see this in "The Blind Bandit", where even though Sokka is heavily rooting for the Boulder (he's a strong dude, wins a lot-- probably what Sokka wants to be), he still accepts Toph as a really powerful earthbender. To be honest, I was expecting Sokka to make some remark like "how could a little girl defeat the boulder?" but he didn't. And, let's be real, he knows that Katara and Toph are two of the most powerful people in the world, and he accepts that in a good way (without freaking out or being weird about it most of the time). So, finally, when Sokka meets with Hakoda in Chameleon Bay and Hakota is like ".... men board the ship" and Sokka asks "what should I do?" because he doesn't think he's included, and Hakoda says "didn't you hear? men board the ship", Sokka's sexism arc is finally concluded as he accepts his own masculinity and role of power (especially as he gains confidence in becoming 'the planning guy' and becoming a sword master)