Why does this BJT work as a switch in this logical-NOT circuit, no matter how I orient the emitter and collector?
The NPN transistor is still a NPN transistor if you read it either ways. The mode is called reverse active mode.   

The doping levels of collector, emitter, base are different hence the performance will be different. The gain will be very poor and also the voltage that can be applied across the terminals will vary from the datasheet.