Basically, as with many things in an ongoing series, we don't know yet. When the TARDIS first took off it looked as though the lever that is used to set the TARDIS going on a journey was pulled down. This may suggest the TARDIS piloting itself as we have seen before or it may suggest an outside force interfering.
The first, that it was the TARDIS, seems unusual and out of character. The TARDIS can, and does, pilot itself, usually when it believes the Doctor is needed somewhere but in this situation the Doctor wasn't onboard. Maybe the TARDIS wanted the Doctor to sort the situation out and was afraid he'd run away so removed that option but that would show the TARDIS laking any understanding of the Doctor. The other reason the TARDIS goes weird is when time is getting mucked around but that didn't seem to happen here. The other possibility is that the TARDIS wanted Missy free or wanted the Doctor to see Missy being helpful so kidnapped Nardol as he would ask Missy for help but this raises the question, why does the TARDIS want to help Missy?
The second explanation seems more convincing. An outside force could be Missy, explaining how she broke through the outside force, or some other villain. If it was Missy it is probably part of some plan to make the Doctor trust her. This would also make sense as a Time Lord has a decent chance of beating the TARDIS's defences and hacking it.
If it was some other enemy it will doubtless turn up and explain its motivations some day. Maybe it wanted to strand the Doctor so it could attack London. Here the reason Missy could get them back is simply her superior skills and experience over Nardol. The question is why didn't she tell the Doctor that the TARDIS was controlled?
Overall, we don't know but will probably be told later as part of a multi-episode arc.