Too bad you didn't actually ask why you were pulled over and searched. Unless they had an attitude, they would have said why, after checking your ID's.
I had been pulled over many years ago, not speeding or doing anything odd and was driving alone. I asked, 'may I ask why I was stopped?' and after checking out my ID's, the officer said that there was a report of a stolen black VW. Mine was green.
Always ask if they don't tell you why.