Companies do not cease to exist when they become non-operational or stop trading; good sense and best practice require that companies that are no longer needed should be properly wound up as spelled out in law.
A company is a legal entity or person. Like a human being, a company can reach the end of its lifespan for various reasons, even when such an entity can fully meet its obligations as and when they fall due, i.e., fully solvent. The most obvious reason for such an occurrence is when a company set up to accomplish a particular purpose has attained that purpose and, therefore, it is no longer required.
Such companies are common in the offshore economy as they provide a means for disparate parties, e.g., investors from different onshore jurisdictions, to pool capital into a neutral agency meant to facilitate investments, manage risks, or serve other purposes. Corporate mergers and acquisitions also often result in some dormant companies within the emerging corporate group that are not needed.