Assuming the bike is not structurally compromised, there is a certain fun factor in repairing and replacing parts as needed. Yes, there is a point were a buying an entire bike is cheaper than replacing all the parts. But one advantage to keeping an old one and fixing it up is the valuable lessons you will learn with bike mechanics, and will give you confidence and knowledge in the future. For example, if something happened on a ride, you'd be able to assess the situation, then either deem it as "still okay to ride home" or "better fix it on the road now - I can do it", or "call a friend for a ride".