It's too early to tell with much certainty what the [real] reasons are. According to a lengthy CNBC article citing various experts,
There has been speculation whether Putin is doing this because he is planning a future role for himself as heading the Duma, or perhaps he is planning to give increased powers to another body, in which he might take an active role, the State Council (as "father of the nation" as one journalist put it). Or maybe he intends to become PM again.
As for the departure of Medvedev, there's also multi-pronged speculation whether he was the "fall guy" for the not so successful domestic reforms or whether he is going to be recycled in another more consequential position in the future, after the reforms take place. Medvedev's new position of deputy head of the Security Council, has been called "de facto vice president" by some analysts, who also think the plan might be have Medvedev become president again in 2024.
The main point is that we've only seen the opening move of these reshuffling/reforms, so we don't really know what the end result would be. The most certain part of it seems to be the diminished status of the future Russian presidency.
Puting appointing a technocrat PM (Mishustin) who apparently has no political ambitions (and didn't even have an English wikipedia page until yesterday) could mean that Putin either plans to [over]rule from a new position (e.g. State Council) in the future or that he named someone who will present no competition if Putin decides to become PM himself (and the Duma chooses). Which of these two scenarios is likely to happen seems far more open to speculation at the current stage.
There has even been mention, in a newer BBC article, that Putin may be grooming Mishustin to be a very pliable president. An AP article mentions that Putin was not entirely happy with Medvedev's stance on some foreign policy issues [Libya], when the latter was president. Likewise, Medvedev was accused by other Putin associates of encouraging the 2011-2012 street protests, despite Medvedev stepping down to allow Putin to become president again (in 2011). So the reshuffling might also be aimed at giving Medvedev a "lesson" that he is replaceable as "the front man" in the future.