When the car accelerates with acceleration a, the bob tends to move backwards due to its inertia.
If we observe from inside, that is inertial frame, then we feel that some fictitious force acts on the bob which deflects it backwards.
The forces on the bob are the tension in the string of the bob, its weight due to gravity and the force due to acceleration of the car.
The tension is resolved along vertical as well as horizontal direction.
The vertical component is balanced by the weight and the horizontal component is balanced by force ma.
This is the angle made by the bob.