^ It's done via the repository technique (also called slaving).
A couple tutorials if you're interested:
https://modthesims.info/t/229452
https://hugelunatic.com/repository-technique/
Can also be used to make CC items pick up textures from other CC items, especially to reduce the need for recoloring and for mix-and-match purposes. Jonesi's blanket is a popular one.