Earlier quoted context omitted.
As the only purpose? Isn't it a little bit more likely that they want to check the same person is using the same passport?
Well, i don't believe they take the picture for your benefit. Actually also seen that a picture is also taken on exit. So yes there might be more reasons like making sure the biometrics match with what is stored in the rfid chip on the passport. But you can bet that the data is stored and will be mined when needed.
Don't worry, they only keep your data for "as long as is necessary".
http://www.heathrow.com/departures/security-and-baggage/flyi...