Updating the answer according to the updated question.
The pressure in a liquid changes in response to applied forces.
As an example, we can take a vertical cylinder with a liquid compressed by a heavy piston on the top. The heavier the piston, the greater the pressure of the liquid, since this pressure has to balance the weight of the piston - otherwise, the piston would keep falling.
We could replace the piston with a column of liquid of an appropriate height and get the same result.
We could replace the heavy piston by a light piston and apply some down force to it. If the applied force is equal to the weight of the heavy piston, the pressure of the liquid would be the same as it was under the heavy piston.
We could put such cylinder in the horizontal position and the pressure of the liquid would still be similarly affected by a force applied to the piston.
The bottom line here is that there is more than one way to raise the pressure in a liquid.
Moving to the problem at hand, before the container starts accelerating, the pressure at points A and B is the same and corresponds to the column of liquid above them, $\rho gh$.
When the container accelerates horizontally to the right, the left wall of the container exerts an additional force on the liquid near the wall, which increases its pressure. This pressure propagates in all directions, resulting in a reshaping of the liquid to adjust to the new balance of forces.
Since the liquid is accelerating now, the pressure at point A has to be greater than the pressure at point B - otherwise, there won't be any net horizontal force required to accelerate the parcel of liquid between them.
Since the pressure, at any given point, acts in all directions, including vertically up, the upward pressure from point A will be greater than the upward pressure from point B. Then, to keep things in balance, the downward pressure of the column of liquid on point A has to be greater than the downward pressure of the column of liquid on point B, which necessitates the inclination of the surface of the liquid, as detailed by the calculations in the textbook.