There are a couple of plausible scenarios -
(1) the NSA was running surveillance on all political challengers,
(2) Obama was running against Alan Keyes who had ties to the state department and served on the staff of the National Security Council under Reagan so he could easily have had spook connections, maybe he called in some favors looking for dirt on his opponent.