Maintaining legacy systems incurs high costs due to frequent repairs, lack of support, and inefficient performance. In contrast, modernizing legacy systems, although requiring upfront investment, reduces long-term costs by improving efficiency, reducing downtime, and minimizing security risks, thus offering a better return on investment.