What kind of extreme weather would justify a pilot of a commercial airliner taking avoidance measures to the point of likely stall?
Any which the pilot thinks is more dangerous than the avoidance measures?
If you were driving at 100mph towards a wall which you reckoned had a 90% chance of a head-on collision, or could attempt to turn which had a 50% chance of throwing you off a cliff, which would you choose?
Any decision the pilot makes will be made on the basis of "Taking this action is a better option than not taking it".
The main weather which would likely cause this would be high enough levels of icing to be dangerous, or such severe turbulence that the pilot believes the plane will be "upset" enough to throw it out of the performance envelope. A combination of these may be present in a severe storm.
If you are talking about the AirAsia Crash, you may have some misapprehensions.
Normally, the problem with a storm is not "avoidance" once you are in it. The problem is keeping the aircraft flying in a stable configuration in the presence of violent winds. A powerful enough wind can literally turn a small aircraft upside down and backwards. Big Jets are much less susceptible, but can still be thrashed around violently in a storm. The pilot has to react to these upsets and keep flying. So, for example, if the winds put you into a stall, you have to recognize that and do what is necessary to keep air moving over the wings properly. Sometimes, the necessary actions might be completely unintuitive or different than what is normal. For example, if you are upside down, some of the controls work in reverse. If you do not know that, or are not practiced in flying upside down, then making that adjustment can be difficult.
A big problem in such circumstances is that in a storm you may not be able to see the horizon, so you have no visual reference for horizontal stability. Moreover, the artificial horizon, the instrument that tells you your attitude, has a lag, so what you are seeing on the instrument was the situation 1 or 2 seconds ago, whereas your current situation may have changed. In a spin or other rapidly changing flight condition the artificial horizon will be wobbling wildly and unpredictably and is less useful than normal in determining what the true attitude of the aircraft is. In a non-visible conditions this can lead to disorientation.
In the case of the AirAsia flight, the storm could have been putting them into a stall and the aircrew's reactions were not vigorous enough to correct it. Unless details are released on their control inputs and other data, we have no way of knowing. Also, they may have just taken the wrong actions. For example, if you are in normal stall you push the stick forwards to get the nose down, but if you are nose up and upside down, then you have to pull the stick backwards to get the nose down. Since you cannot see, it can be difficult to tell if you are upside down or not.
Also, sometimes a pilot will panic if they are losing altitude fast and pull back on the stick, a fatal reaction. Being inside a storm can be very frightening, even to pilots experienced with flying in them (such as meterological pilots), so panic is a real possibility. Once a person becomes panicked, their training goes right out the window and they can do very illogical things. I was once in aircraft with a high-hour CFI who panicked and he did some crazy things.
Realistically I can only think of one: downburst on final approach. In downburst the aircraft in relatively quick succession encounters headwind, downwind and tailwind. The increase of headwind causes increase in airspeed, but loss of kinetic energy due to increased drag. Then the downwind simply causes loss of altitude and finally the change from headwind to tailwind causes loss of airspeed that may be easily large enough to stall the aircraft.
If this dangerous phenomenon is encountered at low altitude (it only occurs at low altitude, too), the pilot must fly the aircraft at the edge of stall to preserve as much height as possible and hope the engines will be able to make up for the lost energy before he runs out of it. It is the reason Airbus introduced alpha-limit on A320 and alpha-protection already earlier. Alpha-limit limits angle of attack to just below stall when the side-stick is moved all the way aft and alpha-protection sets full power when a slightly lower angle of attack threshold is exceeded.
I suppose this is not what you meant. No, I can't think about anything at high altitude that would call for such aggressive manoeuvre. At altitude either you see the weather developing ahead for couple of minutes (with eyes or on weather radar) and avoid it using normal manoeuvres or you hit unexpected clear air turbulence and just react to it. And clear air turbulence is quite likely to make the plane loose altitude, hundreds of feet, rarely even couple thousand feet, but not gain it.