As it stands now, the Last.FM iPhone app only scrobbles your music when you connect it to iTunes and sync, as opposed to syncing it live, over the air. This has always been because Apple forbid 3rd party apps to run in the background, but the new iOS update added multitasking.
So, why has the Last.FM iPhone app still not updated? From what that Apple page I linked to says, Pandora can play music in the background. Has Last.FM abandoned their iPhone app?