What is the minimum wiring for two switches?

so I could've done the same for the push button too? why do they show the inferior resistor schematic if it is possible to to it without the resistor?