The move to Rackspace will bring about a new backend architecture and a lot more servers, leading to a much improved user experience for everyone. - TPW from Github
I don't believe that cost was an issue for them with EY. It was about their system's needs regarding server resources.
Engine Yard hosting was free. I don't think it was about cutting costs necessarily, but rather it was for improving the performance of the site and opening opportunities for scaling rapidly in the future.
It's not that simple. EY's filesystem stuff is designed for read-almost-always, as you would expect for most Rails sites. GitHub does a lot of writing. Growing GitHub's setup would have been a huge undertaking for EY (from what I've read of their posts) and you just can't do that stuff for free, or you run out of money.
(This is just what I've gleaned from comments. They parted ways amicably. Don't stir up drama.)