People recommend that you should always be honest with and true to yourself. When referring to being the person you want to be and doing what you want to do with your life, this is important advice. However, there is a hidden interpretation that many people make from this that "honest" means being "real"--i.e., being realistic. Hence, the idea of "keeping it real" meaning to not BS people with pleasantries and white lies but telling them the harsh truth.
"Keeping it real" is good advice when living a lie or living in a way that tries to conform to someone else’s standards is a bad idea and will make you miserable. "Keeping it real" is also good with someone else if you can protect someone from harm or helping them improve their life situation by seeing the truth vs. someone saying something just to be nice. However, you have to be careful with the word “real” when used to mean “realistic” (vs. honest). In that case, realism is a defense mechanism to protect you from the negative emotion of disappointment. Therefore, being “realistic” is often just another word for “reasonably pessimistic” or “knowing your limits” so you lower your expectations to avoid getting your hopes up. While that could also be good advice, how do you know what realistic is? You could be limiting yourself unnecessarily, and that would be bad.
Enter the "When 'Keeping It Real' Goes Wrong" (popularized by Dave Chappelle in Chappelle's Show) part of this post. Here's where "keeping it real" goes wrong: you decide to "keep it real" with yourself and cut off opportunities from opening up to you. You might think that you're managing your expectations, but then you don't apply to the school or job that you think you can't get or don't look for your dream home. You end up taking everything you love about life and settling for something a fraction as good as you can have it because you want to protect yourself from rejection, embarrassment, or disappointment.
While it's reasonable, you have to ask yourself whether the pain of rejection is worse than the regret from not doing it. Sometimes it can be (e.g., losing a friend if you try to turn it into a relationship), but it often is not (e.g., potentially getting a dream home vs. saying, "Oh, well" if you don't submit a winning offer). In many respects, you're better off learning to manage your response to setbacks and failures than you are learning to manage your own expectations.
Similarly, you could mean well when you try to manage someone else's expectations, but you might also be stunting their growth and potential as well. If you tell someone to be realistic and not, say, try out for a professional sport, then that's potentially more limiting than it is helpful. But if you tell people to go for it but also to become a well-rounded human being by learning finance, business, or other fields for life outside and after sports, you are supporting their dreams but helping them be ready for any setbacks their life might take. One is limiting; the other is not only supportive but might even be expansive or even more demanding. Imagine an athlete instead of being demoralized being pushed even harder to excel as a student-athlete. So "keeping it real" might be much, much more detrimental than simply being supportive while helping people maximize/optimize their life in all areas.
So, be true to yourself and others, but mitigate the risk of setting artificial limitations when trying to be “realistic” by keeping your mind open to the practically unlimited possibilities. Yes, setbacks and failure can feel devastating, but people get over things they tried that didn't work out much faster than people who never took their shot and think about it for the rest of their lives. Almost no one talks about the chronic consequences of self-limiting relative to the acute consequences of failure. But just like almost no one remembers who won or lost the Super Bowl or World Series 20 years ago without looking it up, no one is going to recall or care if you take a chance with your career or life and it doesn't work out for you...but you'll remember the experiences and how they led to something else/more and something else/more from there. Every experience in your life will build on itself, and you'll learn and grow into the best version of yourself if you keep yourself striving to be the person you want to be.
So feel free to "keep it real" at your peril—it might keep you from disappointment and failure, but it is just as likely or more likely to limit your potential. And which is worse: a failure in one area who found success somewhere else or a "never was" who never took their shot and now tortures themselves every day about what could have been?
In short, if you want to be honest with what matters to you or someone asks for your honest opinion for their own good, you can keep it real...but if you want to live your best life, you need to make it real—then you can keep it real.