California cops are notorius for giving out tickets for loud or big looking exhaust. Also car height and other mods. He was following you for while to see if your exhaust will be loud and if its loud to him he will give you ticket. Here in AZ I have no problems, cops are cool here.
If you have a friend in a shop tell him to print you an invoice that states that your car is bone stock and judge will flush the ticket.