After the Taliban took over Afghanistan, last year, several civilians fled to different countries in order to seek refuge. Some of them also went to Pakistan for shelter but instead of giving attention, Pakistan took action against Afghani migrants.
The TTP has deep historical ties with the Afghan Taliban, al-Qaeda and the Islamic State in Khorasan Province (ISKP). It is a by-product of al-Qaeda's jihadi politics in Afghanistan and Pakistan after 9/11.