Why does 3-to-5 volt with transistor not work the way it should?
Both circuits invert your input signal. The second one will not work properly. 

If you want a non-inverting level shifter you can use this circuit: 







simulate this circuit &ndash; Schematic created using CircuitLab

When the input is close to 3.3V, the transistor is off and R2 pulls the output up to 5V. When the input is close to ground, the transistor is saturated and the output is equal to the input plus maybe 50mV.