It may not be the case here, but in some cases Giant skimps on some components within the group set (I.e not everything is 105 on their 105 level bike). Some parts may be proprietary branded etc. that may not matter much but does impact cost.
Otherwise mostly marketing costs you are paying for. Trek is considered by many to be good on warranty claims too if you ever had one.