This phrase has several related meanings. A person has been defeated or punished, or abandoned to danger, or refused help and support, or been gotten into trouble in a way that makes them take the blame for a bad situation. This latter meaning can also be phrased as “carrying the can” or “holding the bag” or playing the role of the “sacrificial goat.”
It appears to have arisen in the mid 20th century as American English, and describes something that often happens in politics, although the two probable sources are much older.
For hundreds of thousands of years, humans have been killing animals and hanging them up so that the blood can drain, and also for ease in skinning and gutting them.
The other source may be the practice of hanging wet laundry on a clothesline. When clothes are left outside to dry, the weather affects them. The clothes may be rained on or may get covered in dust or pine needles when the wind blows. As many people know, cloth smells wonderful if it has dried in the sun, and that smell is worth the risk of rain or dust.
Where I grew up, we hung clothes out to “dry” in the sunlight, even when the temperature was way below freezing. Some of the moisture did evaporate and the clothes smelled fresh though the drying had to continue indoors. But can you imagine trying to fold a frozen king-size sheet so that it will fit in through the back door?
The implication of the phrase is that, if you are hung out to dry, your question is left unresolved or you’re in a state of suspense. To get the full visual impact, think of “hanging in the wind,” “blowing in the wind,” or “twisting slowly in the wind.” And think of being helpless, unable to do anything about your situation, because you’re firmly fastened to an exposed line.
My sense is, having hung a good many clothes out to dry, that that is where the phrase arose. If it came from hanging meat to bleed out, it should have appeared in the language long before the mid 20th century.