Two motors are driven forward, why are they rotating in different directions? I have the Lego Mindstorms EV3 Pack and built a simple car with 3 wheels. The back wheels are motorized.

When I run the following code:

Motor.A.backward();
Motor.D.Backward(); 


both motors are rotating in different directions. I could understand if backward needs to be interpreted as forward. But how come that the motors are behaving differently?

It is basically not a big drama, I could build a wrapper to handle this. But still: When I want to use a chassis implementation, I would maybe run into that problem?
The "forward" and "backward" expressions are only interpreted in the reference frames of the motors themselves and translate to clockwise and counter-clockwise. In your case you must have mounted the motors in a way which requires them to rotate in different directions in order to propel the vehicle.

Consider a car with four wheels: in order to go forward, the wheels on the left hand side need to rotate counter-clockwise but those on the right side must turn clockwise.

While most chassis types share this property, it is indeed possible to build a chassis that requires both motors to be driven in the same direction for the vehicle to advance. In that case the program must be adjusted to accommodate for that.