Actually I don't think they waste that much time on them, at least not as much as we do.
Well when it comes to Achievements or Trophies it kinda depends on how much I like the game, so when I finish the game if I feel like I need some extra challenge I try to get as much trophies as I can until I'm sick of the game.
For example FF XIII's Treasure Hunter's trophy took me forever to get it, but I didn't stop not because I wanted to brag with my friends or anything, just because it was a challenge for me in a game I enjoy playing.
However there are some trophies which can be really meaningless or just needs too much time to do.
So far I've only had 3 Platinum Trophies, but in general I'd be disappointed when I buy a game that doesn't have trophies.
I think for a lot of people, achievements can actually help to extend gameplay. Ramis' Treasure Hunter example is perfect.
Another good example is Deus Ex: Human Revolutions' Pacifist and Foxiest achievement, which you get for completing the game without killing a single person and without setting off any alarms respectively.
I admit I usually don't care much for achievements - I don't not like them, I just can't be bothered usually - but for Pacifist I specifically completed the game using a different tactic than usual (I usually hate stealth games and go in to every area guns blazing). By working for the Pacifist achievement I found I truly enjoyed the game in a new way which I'd never have done without the achievement available.
As for fixing bugs instead, a development team is (usually) made up of a large number of people, with one team dedicated to one thing, another team to another, etc. In other words, there are people working specifically on fixing bugs, and it proabably wouldn't make a difference if one more person were assigned to that team rather than coming up with achievements.
now take spacemarine with linear sp and no replay value unless you are trying to get the 50 acheivments which mostly consist of playing linear sp again but swinging a different weapon woopwoop
However, the concept has existed for a long time. It's existed in the age old high scores and wanting your name at the top. It was also evident, for example, with all the extra stuff in Final Fantasy X. You can complete the game without fighting dark aeons and gaining celestial weapons, yet people do it anyway. Why? Because it gives them some bonus challenges to complete and then they get to brag about it.
All that's changed is that the games give you a little gold star for doing certain things, and offer extra ones for doing ridiculously hard or stupid feats.