The matter of immunity aside, tissue cyst formation is part of the normal life cycle. The occurrence of cysts in brain and muscle in chronic infections seems to be an evolutionary adaptation related to transmission, thinking of what predators eat, i.e. meat. Of course, the modern human host is a dead-end host in this respect. But most animals are not.
As regards cyst-forming coccidia (Toxoplasma, etc.) in human and animal vertebrate hosts, immunity is not necessarily the only factor influencing tissue cyst formation (or not).