The resistors are required to prevent an infinite current from flowing. What does this circuit do?

simulate this circuit – Schematic created using CircuitLab
(hint: it's not much different from this circuit)

simulate this circuit
How much current flows? A lot. This is an NPN transistor, so called because it is constructed from a sandwich of N, P, and N doped semiconductor. That is, it's two diodes back to back sharing a cathode (a diode being just a PN junction). The base-emitter junction is exactly a diode, and that's why it has an arrow. The base-collector junction is also a diode, and the only difference is that the asymmetrical construction of the BJT means you won't get a very good transistor if you try to use it backwards like this.
Like any diode, the current that flows in the base-emitter diode, once forward biased (about 0.65V for any silicon junction) is limited only be the internal resistance of the diode1, and the resistance of the wires. This is the same reason you need a resistor or other current limiting device when driving an LED from a voltage source.
Likewise, consider what happens here:

simulate this circuit
Hint: it's not much different from this:

simulate this circuit
(\$0.2V\$ being the collector-emitter voltage of a typical BJT in saturation, and the base current being small enough to be negligible).
Again, you get smoke. The resistors are there to limit the current through the transistor.
1: this is a first-order approximation. Really the voltage-current relationship for an ideal diode, with no internal resistance, is an exponential function, but at some point, the current shoots up so rapidly for any increase in voltage that the current might as well be infinite.