Polar bears get vitamin D from their diet, which includes a variety of fish, seals, and other marine animals. They also get vitamin D from their exposure to sunlight, particularly during the summer months.