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
For a professional job, there's usually a waiting period of a couple weeks before the job is ready to onboard you. It's extremely rare and unexpected that a company gives you an offer on Friday and expects you to start on the following Monday.
It's not just your manager, it's your coworkers, it's your team. You don't want to leave them hanging at a critical juncture with no time to find a replacement. It's not for no reason, it's because relationships matter, more than you know, and it pays a lot of dividends to invest in long-lasting relationships that carry on even beyond your job.
I guess we hang out in different crowds then. The other software engineers I know would congratulate someone for leaving with no notice. The only reason we haven't is fear that your managers might start trashing you in the community here, there is zero concern that coworkers would be upset.
I get the concept of not burning bridges, but you gotta ask if the bridge is gonna take you somewhere you want to go
Edit: Additionally, every job I've worked at in my career has wanted me to start ASAP. I've even had one explicitly ask me if I could give my previous employer less notice so I could start earlier
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