In short: captive market, and the volume of sales.
Historically, it was also that products made for export could not be sold in Taiwan directly but not sure how much of this still matters now that nearly all the manufacturing has moved to China.
And why is it more expensive on the Internet? This I've been wondering myself but have no definite answer. In some cases, prices can be brought down significantly with rebates, discounts, coupons, points, or other loyalty schemes, and they start high to perpetuate the illusion of a great one-off deal that can disappear anytime. Also, not everyone can (or will bother to) go and check the retailer prices in Taipei.
If you're in the market for a laptop, Taiwanese manufacturers allow employees to make purchases at a discount (sometimes it's test units). Ask around if your friends can get something like this for you.