Moderating any online community is extremely difficult. Rules are generally guidelines and not always set in stone. So, this leaves things up to the discretion of moderators. It can be quite difficult to determine if something is or is not within rules. Was this locking a mistake? Probably, but one question locked means nothing. Moderators always have to watch out for 'rules creep' where the rules are stretched just a little bit over and over again until they are virtually non-existent.
In the SO case, can the moderators be a bit strict sometimes? Sure, in my opinion. But I don't think this is indicative of any broad problem on SO.