They did that to spite Nawaz not Erdogan:
"Speaking to Dawn after the meeting, PTI vice chairman Shah Mehmood Qureshi said the
party had decided it would not attend a joint session held under a “controversial” prime minister who was facing charges of corruption.
Mr Erdogan is scheduled to arrive in Pakistan for a two-day official visit next week. The government plans to convene a special joint sitting of parliament on Nov 17 so the Turkish president can address lawmakers.
Mr Qureshi said the PTI considered Turkey a “sincere friend” of the country and a brother Islamic state.
He also said the party had great respect for the Turkish president."
https://www.dawn.com/news/1296017