uk – Why stamp a passport at LGW when only changing planes?

Wife and I flew JFK-LGW-BCN. At LGW, we were supposed to have 02:35 to change planes, but it was actually much shorter. Don’t remember much other than some helpful people rushing us from place to place with my wife in a wheelchair.

But looking at our passports today, I see that both of them were stamped that date as entering UK with six month permission.

Before we were married, I changed planes several times in LGW or LHR without getting a stamp. Why would it happen this time?