Is there relation between logic chip names and their internal structure
In most (all?) cases there is some company-internal policy that determine the manner in which both the stem (74, Atmega, PIC16F, CD40, ....) and the suffix (00, 04, etc) are derived. Often they make little or no sense  without the internal structure of the company. Once a company-specific type has gained widespread use and other vendors make it too, it might get standardized by some committee, which ads compromises and more confusion to the numbering scheme. More often a certain device becomes a 'de facto' standard, and at least part of its type number/name is adopted by other manufacturers. They will often add a company-specific prefix or replace the orginal one. Such generic products are often called by just their number: 7400, 555, 7805, 741. AFAIK SN7400, NE555, LM7805, uA741 are designations of the original manufacturers.

In short, there are no fixed rules.