only thing I can think of is that the command to voice was somehow delayed until after the kick/ban. This can be caused by lag, although, in theory, if the voice is lagged, then the kick & ban should be to, presuming that all commands are going through the same server.
If there're multiple bots, then a bot that kicks/bans might have a connection with less lag than the bot that voiced.