Often mechanical in its nature, the small board lets one easily fit a wire-to-board connector for one-or-another 2 or 3 wire cable connector system (JST something, Molex something, 2.54mm headers...), you can plug and unplug the cables easily. That compares to trying to directly solder wires to the male pins of the microswitch, not pleasant when you're using multi-cored wire as flexing of it will be cmmon and the wire breaks at the interface between the solder joint and the insulation, and soldered wires can't be as easily attach and removed as cables with headers.