I think Marlin defaults to normally closed end stops, so when you connect your end stops with the nornally open terminal it will show the endstop is triggered. This is done so that it will also trigger if the endstop plug comes loose or a wire breaks. You can either change the endstop or change the firmware to invert the triggering.
--
Kind regards
Imqqmi
NFAN CoreXY printer:
[
reprap.org]