I encountered this diagram when reading an explanation about why the front wheels of cars lift up when they accelerate. The diagram is in the reference frame of the car, so that there is a fictitious force $MA$ on the center of mass. $f_1$ and $f_2$ are the frictional forces on the wheels. Now the car is not moving backwards and accelerating forwards. It is moving forwards and accelerating forwards. So when viewed from an inertial frame, $f_1$ and $f_2$ should point opposite to $A$, right? Yet why does it point in the same direction as $A$ in the reference frame of the car?
We aren't interested in the bulk motion of the vehicle, only the relative motion of the part of the car touching the road (the bottom of the wheel).
It's often useful to imagine what would happen if we turned friction to zero. We'll let the car move forward a bit and then turn it off.
As the accelerator pedal is pressed, the wheel will slip and spin forward. Looking at the ground, the bottom of the wheel moves backward relative to the ground. So when friction returns, the force appears opposite to the relative motion of the tire, and it points forward.
Another way to see this is that a car rolling forward may be coasting (no frictional force), accelerating (friction accelerates the car forward), or braking (friction accelerates the car backward). You can't tell the direction of friction by looking at the speed of the car.
For the vehicle to move in the direction pointed to by A, the wheels have to rotate clockwise in the reference image. Thus the direction in which the wheels push the ground is opposite to A and consequently the ground pushes the wheels or you could say the entire car frame in the direction of A (3rd Law). These are the forces f1 and f2 depicted in the image. Note that we always show those forces which are acting ON our frame of reference by elements outside the frame, which is the road in this case providing friction.