The goals of terrorism need not be worldwide. The point the gunman was trying to make when he shot Malala Yousafzai was not to the West. It was to the local people in Pakistan that education of girls would not be tolerated even if it were mandated. It was not to stop schools from opening, but it was to deter interest in the parents and girls from attending those schools. That is a political goal, and it absolutely motivated the shooter to commit an act of terror.
One may argue about the legitimacy of that goal (it's certainly taken as a religious teaching in that part of the world), but that does not make the goal apolitical.
One may argue about the legitimacy of that goal (it's certainly taken as a religious teaching in that part of the world), but that does not make the goal apolitical.