According to the post, the Twitter API was already generating $400M/year in revenue. Not sure what it cost, but that doesn't sound like a charity to me.
They have a hell of a lot to do with each other beyond that too.
(Led the search API team at Twitter and worked on both API platforms)