It is unlawful for any corporation formed under this chapter to carry on business contrary to or outside of the purpose for which it is formed.