Reason behind partition of C++ and python in Pytorch Design Philosophy

I don’t have a lot of experience understanding the internals of machine learning frameworks. I noticed that the optimisers are written in pure python while NN module was written in C++. Could I know the reason why this was more efficient ?