Because Walt Disney himself felt it would be better and audiences wouldn't sympathize with a snake being a good guy.
Kaa appears in the 1967 animated adaptation by Walt Disney
Productions. This version of Kaa is recast as an antagonist, as Walt
Disney felt audiences would not sympathize with a snake character.
this followed the ...