What is the purpose of framing a recessed medicine cabinet?
That framing is included for three reasons:  #1 It is there to support the wall board.  The wall board is not strong enough to support itself at its edges or beyond 16". Wherever you find an edge of the finished wall board you should find some kind of framing behind it. This helps the edges of the wall board to butt together nicely.  #2 The framing is there and should be connected to the existing wall framing to support the medicine cabinet.  The wall board is not considered strong enough to support anything on its own.  The medicine cabinet would never hang true and plumb for long, hung from the wall board alone.  That is the job of the framing. #3 Even though this may not be a load bearing wall, once you eliminate one or two of the continuous studs, you have now compromised the integrity of the wall.  Now the finished wall surface may never be able to look really good. It can show buckles and creases because the framing inside the wall is out of alignment, i.e. no longer straight and true. Quality carpenters understand that everything they do and the quality thereof affects the final look and outcome of every project.