You've got a free S5 and a contract with Three for (probably) a 2-year subscription against a much higher price than the same contract would be in sim-only version, so - in effect - you pay for the phone in 24 monthly installments.
That's a contract with Three, not a contract with Samsung. Samsung isn't involved in any way. They sold the phone to Three, Three paid them. Three sold it to you and you have to pay Three. If the contract between Three and you doesn't have provisions for returning it, there's nothing you or your lawyer can do about it, unless some consumer protection law applies. But you didn't tell anythng about that.
In the future, better read a contract before you sign it!
I bought a samsung galaxy s5, so a contract with Three got the s5 for free and now I've changed my mind and want to get another smartphone can I go to Samsung and refund it there because Three won't let me !!