What are the benefits and drawbacks of rotating professors to teach subjects not in their areas? It seems that many universities are rotating professors who teach a subject. I was talking with a friend and he mentioned that as a result of this, he is struggling with a professor who is teaching a subject outside his area and is still learning the materials. My question, is why do schools apply such strategy? Wouldn't it be better to focus on few related topics, instead of assigning professors to some random courses?
Most programs I've ever heard of don't randomly assign professors - but the typical system in the US I'm aware of has each professor required to teach X number of credits. The department has requirements for what class must be taught (like standard intro classes, courses required for the major, etc), as well as the opening for a variety of specialty courses (often called "electives") - but the core courses have to be taken up first.

While departments differ, it seems the most common system is one where professors pick the classes they will teach (sometimes by seniority or department rank getting their first pick, sometimes by some other method). The natural order of things is that it's easier to teach a class the second time than it is to teach it the first time (since you already have so much material prepared and you have had some practice now), so professors naturally end up teaching many of the same classes year after year. However, most departments have comings and goings nearly every semester - retirements, people leaving, sabbaticals, medical leave, changing course load amounts (buying out of teaching, becoming a department chair, not being the chair anymore, winning a big grant, having a big grant run out). Thus things are constantly in flux, so even if you really, really wanted the same courses taught by the same professors every semester - you can't have it, it isn't possible.

There is a downside to having things static, even when you somehow manage to have so much stability that it's possible. Some examples:


Many professors get comfortable with the material enough that they don't make large updates, and it can get stale and out of date over time (both materially and in method used). 
Professors, being human beings, get bored of saying the same thing over and over and their excitement, passion, and patience can begin to wear thin even with classes they once enjoyed. 
Some students aren't a good fit with some professors, and if a required class is always taught by a professor they don't get along with this may interfere with academic progress.
Professors can lose sight - or just not have a good idea to begin with - what the goal of teaching some material actually is. Most programs have courses that build on each other, like Introduction -> Research Methods -> Stats -> Advanced Research Methods. If you only teach stats and don't ever run an advanced class, are you sure you are teaching the stats students will need - and are you emphasizing applications that best prepare them for the advanced material? If you teach a Calculus I class, are you making sure students get all the groundwork they need for Calculus II? I've had students tell me "the Professor assumed we all had JavaScript in the previous class and designed the whole class around it, but half of us had never seen it before!" - with not very encouraging results.


However, there are downsides to moving people around a lot too:


The first time is always the hardest. No one knows what to expect, every question asked will be one you might not have answered before, the teacher's idea of pacing and time required to complete assignments will basically be wild guesses, etc.
Sometimes someone is asked to teach a class because no one else is available. I talked with a visiting academic who was a statistician, and he said in his first semester they came to him and said, "Hey, have you ever used C++ before?" He said, "Well, I guess a little bit in undergrad..." And so they said, "Great, don't have anyone else to teach this required class - will you teach a C++ class for us?" So he just had to figure it out as he went. It isn't ideal, but the alternative: no class offered that semester, which may mean students can't take required key classes or they will just miss out on learning important material entirely. Sometimes everyone just has the make the best of a non-ideal situation - come to think of it, that's what most of us have to do most of the time!


In the end, there is a first time for everyone. Experienced professors had to teach a class for the first time too. Sometimes this can even be a positive experience for everyone, if the professor and the student choose to handle it that way. One of the hardest things about teaching people is when you've forgotten what it was like to not know. You can all learn together, and it can be easier to have empathize with students confusion and anticipate their questions when you are confused and have questions too! The job of a teacher isn't always to be an expert bestowing their grand accumulated wisdom, but instead sometimes they are just a guide and skilled companion to help you through difficult territory.

...and sometimes neither of you want to be there, but it's a required course and the department is making them teach it so you suck it up and move on. :)