My question involves towing laws for the State of: California.

While I was out of state my California drivers license expired. Upon returning to California, I was driving a friends car that I had borrowed, when I was pulled over. The car was towed and impounded for 30 days.

How can the car be impounded for 30 days when it did not belong to me?

I borrowed the car and my friend was unaware (as was I) that my licence had expired.