Astaxanthin and related carotenoids are synthesised by algae, passed to zooplankton, and concentrated up the food chain. Salmon cannot synthesise them, so every red pigment molecule in a sockeye was eaten. At sea the pigment sits in muscle tissue, which is why sockeye flesh is the deepest red of the Pacific salmon.
At maturation the fish stops feeding and remodels itself. Carotenoids are mobilised out of muscle and deposited into the skin and, in females, into the eggs. The result is the familiar image of a crimson-bodied, green-headed fish on the spawning gravel, with flesh that has become noticeably paler and softer than it was in the ocean.
The pigment is not purely ornamental. Carotenoids act as antioxidants and are transferred to eggs, where they are thought to support embryo development, and the red skin functions as a breeding signal. Disentangling the signalling role from the physiological one is difficult, because both draw on the same limited pool of pigment, and the relative importance of each is still debated.

