When the premium is not mandated by the government, it is usually derived from the calculations of an actuary, based on statistical data. The premium can vary depending on many factors that are believed to affect the expected cost of future claims. Those factors can include the car characteristics, the coverage selected (deductible, limit, covered perils), the profile of the driver (age, gender, driving history) and the usage of the car (commute to work or not, predicted annual distance driven).
Auto insurance is financial protection, and not just for the investment you made when you bought your car. After a really serious accident, bills for damage and injuries can easily reach into hundreds of thousands of dollars. If you happen to cause such a wreck, the victims could sue you. In the worst case scenario, assets such as your savings and home could be seized.