Raspberry and Yun are two different boards, it's hard to compare them with the price.
You can see a Yun like a linux embedded system (like the Raspberry) with WiFi and connected to an Arduino Leonardo.
If you sum the cost of a Raspberry plus the cost of an Arduino Leonardo and a WiFi dongle the two prices become very similar.
First, inside Yun there's something really far away from RPI, no GPU, processing power very limited and limited resources, it's a router CPU and RPI was made for a smarthphone.
Second, a WiFi dongle cost 5US.
Third, leonardo CPU it's ridiculos cheap
Sum all and you still far away from a price of RPi. I agree, YUN is a fail, it's too costly and technically is not open source.
Most recent arduino products are too costly, look at Zero for example, it should cost at list half of current price (and it's still costly).