So I assume you ask the manufacturer for the datasheet values of the electronics.
The chip ID is parsed. Than the values from that big lookup table is than presented to the user?
Or are those sizes and features of the chip determined by the software and not from a lookup table?
What can be read from the card/board/bios/driver is read, some properties can't be read, because they aren't stored anywhere like release date, process size, die size and transistors, so GPU-Z uses a table for that
Also DirectX support, so that the correct hardware support capability is listed on all operating systems. Current capability can be checked using Advanced -> DirectX 12
and of course some logic must be hardcoded like "10DE is NVIDIA", or "memory bandwidth is calculated using the formula ..."