In competitive programming, you work within constraints chosen by the competition hosts and try to create code as fast as possible that meets the criteria. In real-life programming, you worry less about speed and constraints and instead focus on finding unique solutions to problems. Real-life is much broader.
Competitive programming is fun because it can drive your skills, help you meet fellow programmers, give you career opportunities, and come with the thrill of victory and success. It’s not fun in cases where it can eat up your time, end in disappointing competition results, and impair your general coding skills.
Competitive programming is not a waste of time unless you despise doing it and fail to use it to your advantage. You can win prizes, meet other professional programmers, hone your skills, and learn tons of things from competitions. On top of that, it can open doors in your career by giving you networking opportunities.