Why do some people spit in public places, even in the public transports?

Social ineptitude. There is a deep visceral repulsion to spitting generally and it is considered unsanitary as well as rude to spit in public places. Rarely some may have no choice but mostly it is a choice related to lack of social consciousness.