Why do 3D printers have only one limit switch?
In principle you only need the minimum axis position (or the maximum), the offset to the bed and the size of the bed in the direction of the axes. Fortunately, you can specify this in the firmware:

E.g. in Marlin Firmware offsets are defined as travel limits:


// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS -33
#define Y_MIN_POS -10
#define Z_MIN_POS 0
#define Z_MAX_POS 240


Bed size:


// The size of the print bed
#define X_BED_SIZE 200
#define Y_BED_SIZE 200


Do note that some printers do have maximum endstops on top of minimum endstops. This is handy in case of layer shifting (e.g. caused by the nozzle catching the print as such that the belt skips notches and as such redefining the reference frame) to prevent the carriage from destroying the printer at the maximum of the axis.