Centers are trained to take faceoffs as part of their responsibilities, and so are better at it in general. Wingers can take faceoffs, and often do if a center is thrown out of the circle for a violation (such as moving early or not getting set). There is no rule about who has to take a faceoff. Here is a video showing the center getting thrown out, so the winger comes in to take the faceoff in his place. The second violation draws a penalty.
There are a few reasons centers ended up being the ones to take faceoffs, though. The first is balance; you want to have the same number of people on either side of the circle. This is so your team can be prepared no matter which way the puck goes after the faceoff. If you have a right winger taking the draw for example, and the center and left winger are both on the left of the circle, then you would have no support if the puck went to the right.
So, we want our team to be balanced on both sides of the circle. Then, it makes sense to train centers to take the draw instead of a winger, so that after the faceoff, the players don't have to worry about switching back to their respective positions while the play is happening.
It is also important to note that in hockey, the positions are very fluid and not set in stone. Defensemen pinch in to play offense sometimes, forwards will backcheck on defense, and wingers and centers cycle. Any skater on the ice can, in general, play any of the skater positions if need be. It all comes down to specialization, and which responsibilities they are best at covering. It is not unusual to see coaches have forwards change positions throughout the course of the year. Wingers get moved to center for some games and vice-versa. Sometimes, even forwards and defensemen will change positions! This was seen famously in Dustin Byfuglien, a current defenseman for the Winnipeg Jets. In 2010, he won a Cup with Chicago playing forward.