Only half that statement is true. Twitter has tons and tons of custom infrastructure. Most of those projects are largely built and maintained by Twitter. But their business is built on network effects not trade secret infrastructure, so releasing it as open source helps more than it hurts.