It's because midfield is, ultimately, one of the most versatile places on the pitch. Of course midfielders do try and prevent the ball from getting into their own halves, but some midfielders are specifically geered much more towards attacking like you said. However there are specific 'defensive midfield' players who act a go-between between the defence and the midfield such as Lee Carsley at Everton. I think the thing is that players like Ronaldo and the like are considered the best in their position is because a goal scoring midfielder with flair is much more fun to watch and impressive than a no thrills but gets the job done holding or defensive midfielder. Obviously midfielders do chip in in defence when needs be though.