The とり in しりとり wasn't from 鳥 tori 'bird', but from 取り tori 'to take'. The 尻 shiri part is the same as the word that means 'butt', because it just means 'rear (part)'. So 尻取り shiritori means 'to take from the rear' or 'take from the end'.
The pun of the joke あたまとり (or, in kanji, 頭取り atamatori) is that, instead of taking from the 'rear' (the 'butt', shiri), they take from the 'front', or the 'head' (atama).