Modern software is assembled from many outside components, each of which may depend on others, so a finished program can contain code from hundreds of sources few people have examined. When a flaw turns up in one of those components, the hard question is simply which products contain it.
A software bill of materials is a detailed list of every component a program includes, like a parts list for a machine. Keeping one means that when a problem surfaces, affected systems can be found and fixed quickly rather than discovered the hard way.