In the show and the movie, Miley lies about stuff in almost every episode and never seems to permanantly learn anything from it. this troper realised while watching the finale that this is probably because from the time Miley was about 12 years old she's been encouraged to lie about having two identities.
Essentially, she was used to always finding a way to allegorically have her cake and eat it too—to successfully, happily have the "best of both worlds" of living a normal life and the life of a teenage pop superstar. Things became so complicated and heartbreaking by the time she graduated from high school, that she had to choose between one or the other when she could no longer manipulate, scheme or negotiate her way through her personal issues, and she was hurting those she loved in the process; She couldn't have it both ways any longer.
Although Miley did a lot of things that made her personality seem sort of nasty, mostly in the later seasons, you have to consider this: while Hannah Montana, the sweet, innocent persona she puts up when she's being her famous self is seen to the world as this perfect human being, when she's Miley and out of the spotlight, she is more herself and we see many glimpses of her not being this sweet angel everyone makes her out to be. This can be said about every show in the past few years that has the fame concept and depicts a main character that's really famous and it can also be said about the people we see in school who look and seem so perfect when we see them in the hallway. And they may not do awful things when they're not holding up that perfect image for the moment, but they could do other things behind closed doors that society would not accept if word got out. Hannah Montana really gets us to look at the popular people this way and to not feel so insecure about ourselves.
Hannah Montana's fourth and final season was shot in 2010 and broadcasted between 2010 and 2011, a period of time in which Miley Cyrus was in real life moving into a more mature image and sound, and hoping to transition into more adult film roles, much to the chagrin of Moral Guardians and many longtime fans. It appears that many episodes had a Reality Subtext behind them, as if what was going on in Miley Cyrus's life and career was carried over to Miley Stewart's life and career, too. For example, one episode deals with Hannah experimenting with a new sound after going through writer's block and needing one more song for her next album. After she and Lilly hold a "focus group" to audition the new song, she finds out her fans dislike it (a funky, hip-hop/techno-dance song called "Gonna Get This") and want her to stay the same. Robby Ray suggests that Miley ultimately has to make herself happy, even if a few fans disapprove of her directions. Iyaz enters the studio, encourages her to keep the song, and records it with her as a duet.