Shipping can depend on many things:
If a merchant has an account with a particular shipping company, they'll have a certain price they can ship for. If they ship a lot, they'll generally have cheaper shipping. Shipping companies will go to merchants and basically bid to become their shipper of choice.
If a merchant usually ships one way and you have an item shipped via another company/service (by choice or no), you'll pay a premium since they're not getting the best prices themselves.
The price can also depend on the cost of shipping supplies (boxes/tape) and paying the people that pack and ship the stuff. If a company employs one person at $10/hour to ship stuff and they're only sending out 5-6 orders a day, they've gotta get that money back somehow.
If a merchant get's a bad vibe from you and/or if you have an evil aura, you'll likely pay higher shipping.