The Spy is like this because he got his head chopped off by a Medic and subsequently had his head brought back to life accidentally. Pinkie did this because she thought it would be fun and she is still alive “just because”.
Pinkie: “Ooh ooh! Are you a head too? I love being a head! It reminds me of those birds who put their heads into the sand, except it’s backwards and we don’t have any bodies! It also reminds me of when me and my Maud…”
Medic: “Later…”
Spy: “Kill me.”