Jon's ending

Why did Jon go north of the wall with the wildlings at the end of s8?