California does not offer a grace period after your vehicle's registration expiration date. If you do not pay your renewal fees on or before the date of expiration shown on your current registration card or penalties will be due in accordance with Vehicle Code Sections 9552 – 9554. The longer you delay payment of fees, the greater the penalty amount will be.
The California Department of Motor Vehicles website has a chart of the registration fee penalties for expired tags. The chart shows that penalties range from 10% of the normal fees up to 160%, the longer your wait to renew the higher the fees.
The vehicle code states that besides the imposition of monetary fines or fees as specified in the VC, delinquent registration may result in impoundment of the vehicle. From what we have read many times it is up to the officer to decide if they will write a ticket and impound the car or give you a minor "fix-it" ticket.
Since impoundment is allowed for expired tags then it would appear that the law enforcement officer that found your car with the expired registration tags (including the temporary tag) decided that the car should be towed to the impound lot due to this violation. For more information on your situation try contacting your local DMV or police station.