Why the difference? Is the 10K needed to make the PWM example work, or is it just there to reduce the amount of current needed?
With a 1K resistor and 5V, assuming a 0.7v Vbe drop you get:-
4.3 / 1000 = 4.3mA base current.
With a 10K resistor and 5V, assuming a 0.7v Vbe drop you get:-
4.3 / 10000 = 0.43mA base current.
Therefore for any given collector current you are relying on the gain of the transistor being greater than:-
collector current has to be at least base current times transistor gain
Too much base current is not too much of an issue, it can affect the turn off time of the transistor but not much else.
Too little current and the transistor does not turn fully on so the collector current is not as much as you are expecting and the transistor will dissipate a bit more heat.
The gain of a transistor is typically 100 to 300 for small signals, for power transistors this can be as low as 10.