I'm not sure what causes it actually, but I can tell you I've never logged in with a different id, nor used WiFi sync, nor did any of the other things people have reported might cause the problem. For me it started on my iPad 2 when I tried to download an app via 3G that was too big to download a free app (i.e. failed). On my iPhone 4S it started when I mistyped my password when "buying" a free app over WiFi (i.e. failed).
In both cases it was triggered by a failure to download a purchased app, even both failures were expected and I later downloaded both apps successfully.
If removing the sqldb file actually fixes things then my guess would be that the sqldb file contains apps that failed to download (so the device knows to try again later for automated downloads). If the file gets corrupt such that the "failed" purchase gets associated with a different app (since the file uses indexes not names), then that could explain things. For example, on my iPad when ever I get the message telling me that it was "unable to purchase" a specific app, iBooks would go into waiting. It's as if it's trying to download that app on top of iBooks or something. Maybe the problem happens if there's a mismatch between syncing via PC and downloading directly, I don't know.
The sqldb file doesn't only contain failed downloads though since mine contained over 200 download entries (including things I've since deleted) and around 300 asset files. It also shows a list of successfully download apps.
If there is a bug that causes the indexes in sqldb file to get corrupted, then my guess is that at some point in the future it will happen again.
I actually filed a bug report with Apple. Since I pulled and saved the sqldb files off both my iPad 2 and iPhone 4S, I'll just attach those to the bug report.