The car hire company will take a deposit when you collect your car to protect themselves against losing money.
If something happens while you have the car, they will keep some or all of the deposit to pay for it. For example, if you get a speeding fine or if you return the car with damage, late or especially dirty.