So why are Pokemon referred to as 'it'?

So I got back into Pokemon since playing red forever ago. Now, I played the Mystery Dungeon games and they all refer to each other as he he/she. Then in the anime and in Smash 4 they all call every Pokemon 'it'.

Why do they do that? They have genders as already established in the games. I just thought it was awkward when I saw the Lucario movie and Ash literally blurts next to Lucario's face: "What's its problem?"

Are they seriously trying to imply Lucario could be female? Same thing in Smash 4, it just sounds so degrading referring to someone as 'it'.

I am dead serious, this bothers me.