The reason why the former has had the senior title is down to industry knowledge. They're not the best developer in the room, but they have a mixture of:
* Getting shit done. The quality might not be great, and it might have been late, but they're still there, and they've been at the company while they've delivered something.
* Years in the business. They might not be an expert PHP developer, but they've worked with Drupal for 4 years, and the business is a Drupal shop. This tends to be the common one I see. A senior-level developer in one stack might crumble to pieces in another (source: I was a senior .NET dev, and I'm struggling with Ruby right now).
* Desire to talk. They attend every meetup, and are happy to talk and promote where possible. They've given dozens of talks at meetups and conferences, even though individually they're no better than their peers.