It costs you (14/365)*the salary increase at a new job. Additionally it puts you in a legal gray zone where you have quit employer A, but dont work at employer B yet. Employer B can rescind the job offer which leaves you with no job and no unemployment payments because the states views it as you voluntarily becoming unemployed. I have gone through that situation so it's not theoretical, and it does have an actual cost.
As for keeping a personal relationship, giving two weeks to maintain friendly relationships with a manager is just something weve all decide to do for seemingly no reason. Unless you work in a no skill job, you are not going to be replaced in 2 weeks. You are also not going to be able get an actual knowledge transfer done in two weeks unless your team had already done this before you quit, in which case the notice period doesn't matter anyway.
The two weeks notice period just let's companies get another two weeks of work from you, at a job you have explicitly decided you dont want to stay at