When I applied to graduate school, I sometimes sent applications to two departments within the same university because I could see myself being a fit for either department. In fact, at least one school had explicit instructions for applicants to two or more departments, so it is likely not as uncommon as one might think.
My experience was that it didn't really matter that I applied to two different departments within the same school. The biggest issue was making sure that things like my GRE scores and letters were sent to both departments instead of just one, since somehow there were mix ups along the way. In terms of the review of my application, I don't think there were any drawbacks because there was no overlap between the two review committees (i.e., no one who reviewed applications for department #1 also reviewed applications for department #2). As such, expressing different ideas in different SOPs, etc. did not have any impact on my admissions to my knowledge.
I would, however, caution you against applying to two degree programs within the same department (e.g., the Master's degree and the doctoral degree). Since it's within the same department, chances are high that the same people will be reviewing both applications, or at the very least, it is likely that someone will notice that you applied to two different degree programs. This might come across as a sign that you do not fully know what you want to do, which can hurt your application to both programs. Many departments (although certainly not all) have a policy where if you apply to the PhD program and are rejected, you can automatically be considered for the Master's degree program. If you know you ultimately want to apply for a PhD, I would apply for the PhD and see if you can be considered for the Master's program if your application is unsuccessful.