Every law drama that comes out of the US has the law enforcers breaking the law at various points, justifying it with the ideals of justice and doing what is right. Castle is no different. This makes shows like this, where they hold up an example of a bad cop who regularly breaks these rules to get the job done to try and differentiate themselves, as sounding quite hollow.
Despite this, it's a good episode. Baldwin does well and it shows how Beckett and the team have protected Castle over the years. I like the way that they are interweaving and making the analogy of the rejection and then acceptance of Stanford with Castle's relationship with Beckett, not to mention his cheating with another partner. It's amusing how the children (Ryan and Esposito react to the cheating, . asking for more toys). A good insight into real life break ups.