A-la-carte and/or buying complete and swapping parts always cost more than buying complete.
Buy a quality complete then replace parts to solve specific problems (e.g. stem too short, saddle is uncomfortable) to save the most money.
Also, you have to mentally distinguish between a functional bike and a project bike that has to be just perfect. Project bikes cost a lot of money.