Immigration definitely not needed. At some transit stops, they allow you to choose between staying onboard or the option of getting off. If you get off, they will issue you a transit boarding pass. Sometimes, they require that everyone get off, and wait in the gate holding area, or sometimes they require all passengers to get off, but allow you to walk around the airport.