Spoiler
True, Pinkie is hyper, comes off as immature, over-reacts, and doesn't seems to understand boundaries that most take for granted, but for the most part we're given reasons for the way she behaves. From watching her episodes we know that puts a lot of pressure on herself and tries to hide it so she doesn't spoil somebody else's good mood, she has things that she's good at and loves to do and she sees failing at them as failing as a person, and worries that her friends mean more to her than she does to them. Although she seems incapable of taking things seriously or understanding the gravity of some of the situations she's in, she actually does, it's just that not in the way most would; she doesn't react to threats as the others do because she's more confident that everything will be alright (Interesting trivia, in the Pinkie Sense episode she mentions one that goes off "When something really scary's about to happen" and it's never gone off once in the show) and she does have things that she takes seriously, it's just a different balance than most (really, would it have been that bad if Twilight wasn't surprised when Cadance & Shining told her they were having a baby?)
True she doesn't seem to understand certain norms, like the fact that a formal party is different from the ones she enjoys, and seems to completely miss the negative emotions of others unless she's beaten over the head with it, but we're given a reason for that too; the first 6 years of our lives are the formative years where we put together most of our structure for how things work and are and, well, she didn't spend those years in a normal environment and most of the people she knew had emotions that were really subtle. My guess is some either had really over the top emotions (like one of her sisters does) or it was over compensating once she realised her family wasn't the norm, leaving the middle ground most of us are best with as a sort of mystery zone that she has trouble understanding. But we also see at times that she's smarter than she's usually given credit for (If nothing else she's managed to overcome the limit of Dunbar's Number), can be surprisingly organisned & hardworking, though sometimes her usual image holds her back
Similarly, Rainbow Dash does initially come off as a dumb jock, but we see there's more to her than that, that much of her show boating comes from a lack of confidence, and she initially have a very limiting image of herself that she expands over the course of the series. Part of the reason Rainbow Dash shows off so much is because she's digging for praise as this is part of how she validates herself. This may be why she and Pinkie get along so well, because they are the two most extroverted of their friends and enjoy similar things, including entertaining others, but at the same time have insecurities that they try to keep hidden by pushing their usual image over top of it and gain validation through the reactions of other Ponies to what they do. We also find out in one episode that Rainbow Dash is a kinetic learner, meaning that she has difficulty learning in a classroom environment and needs to be moving in order to learn and that she's actually capable of taking in quite a bit of information when she does (even if you find her test review implausible, before that she notices the things happening around her while keeping track of the conversation she's having), while we don't know how well the schools she went to accommodated her learning style, if they didn't it could explain a lot.
True, Rainbow Dash does end up being faced with a lot of disfunctional people to "test her loyalty", but there's a bit more to it; like her namesake, G4 Rainbow Dash is a very image centered pony (even if it's a different type of image) and can end up being temporarily blinded by the image others project and how well this matches her ideals; this doesn't apply only to errors of inclusion, such as the Wonderbolts in "Rainbow Falls", but errors of exclusion as well such as how she was initially dismissive of Tank because he lacked the physical features she was looking for and later chose him as her pet when she realised he had other qualities that she valued. Yes she does sometimes come off as being Miss-Awesome-Sportsmare-And-Nothing-Else because that's how she saw herself for a long time, through her experiences over the series she's begun to learn that she can be and already is more than that, but she's still learning so it sometimes takes a while, but you can see a shift in her reactions. For example in both Ticket Master & Trade Ya there's a moment near the end where, after spending the entire day pursuing something she dearly wants without noticing the upset she's causing for one of her friends, she finally gets it and celebrates for a moment before being made aware that she's behaved badly; in the first it takes everyone else around her expressing their disapproval for her to realise this, but in the second she's able to reach that conclusion on her own, and perhaps next time she'll be able to realise it before she makes a mistake. All of this also explains cases where she's had to live through being on a receiving end of her behaviour to understand what she's done wrong; she learns by doing and experiencing, and sympathy beyond recognising bullying and betrayal is something she's just started to learn fairly recently, she's getting there but she also has a lifetime of conditioning to overcome.