Twitter wanted to be broadcast SMS. It was for asking all your friends if they wanted to get beer at once. It got adopted for more because that same _why post that inspired tumblr got the Ruby community really excited about spewing whatever crossed their mind at the world.
Back when it was twttr you interacted with it by sending a text message to its shortcode and it relayed it. Also displaying the messages publicly on the web seemed like a privacy issue to techcrunch of all things. They really caught on by pushing it at sxsw for keeping up with other people there. As for the Ruby thing, I didn't follow it that closely. _why coined the term tumblelog for a blog consisting of really short posts, links and images. Microblogging was the term that stuck, but tumblelog gave tumblr its name. Because _why was excited about the format and he had his weird cult of personality going the Ruby community got excited about it too. Twitter started out as a Rails application, so a lot of its early users where Ruby guys, for the same reason there were a lot of lispers on reddit early on.