Just like the way you would set a gateway to a PC. When a switch has an IP (like Vlan1 IP). It needs a gateway to reach out of the local subnet.

For ip route yes by default the route will be only on the device. But you can make it propagate to other routers as well by redistributing it or using the default-information originate command. But there are further details to this, If you haven't seen it yet, check this:

Gateways of last resort selected using the ip default-network command are propagated differently depending on which routing protocol is propagating the default route. For IGRP and EIGRP to propagate the route, the network specified by the ip default-network command must be known to IGRP or EIGRP. This means the network must be an IGRP- or EIGRP-derived network in the routing table, or the static route used to generate the route to the network must be redistributed into IGRP or EIGRP, or advertised into these protocols using the network command..

I understand most of the part,only the last part where it says about static route must be redistirbuted or advertised with network command, I dont really understand what that means, and how it should be done.