Plums are sour. Why are prunes sweet?
Prunes are made from specific varieties of plums which are different than many plums eaten fresh, though they are also often available and eaten fresh.  When picked as fresh fruit however, they are often picked much less ripe than for prunes to allow for shipping and sitting before eating.  If they are ripe, sourness is definitely a matter of taste, I for instance find a fully ripe prune plum to be very slightly tart near the skin, the least ripe part of the fruit.  I also find that same fruit to be very off-putting and near rotted tasting.  That is simply the nature of that fruit.  By the time the outer part is fully ripe, the inner flesh has already started to brown, but has not been dried to prune like nature yet.

The acid does not vanish, though some is converted to other compounds including sugars as the fruit fully ripens, the bigger factor is that more sugar forms.  Once dried and more concentrated, the sugars simply overpower the acids and dominate the flavor.