Wanted to make an adventure map so wrote '/gamerule doMobSpawning false' to prevent animals,, and monsters from appearing, but after typing 'kill @e[type=!Player] and when travelling through map i saw some sheeps, pigs and cows show. So i repeated the command. After next 2, or 3 chunks I can see them presenting again! I think that shouldn't happen and didn't see another report about that, so I am writing this by myself.
I've experienced your confusion before. The gamerule does work, but the kill commands doesn't stretch as far as the mobs have already spawned. Or possible the kill command may be bugged.