We are not required to have them inspected. But they do have to be registered to use on public lands.
The 'green sticker' program has been in effect for longer than I've been riding (1976). One of the purposes of the registration is to fund State Vehicle Recreation Areas such as Hollister, Carnegie, Hungry Valley (Gorman), etc... But in reality the state puts very little of the registration money back into the sport.
Nowadays, they also have 'red stickers'. You are not allowed to ride red sticker bikes in some locations at certain times of the year due to air quality reasons.