In addition to the two answers above, I'll add that, first, your estimate of a million times seems wrong. These numbers are rough approximations of a fluid, not fixed volume, and I'd take them with a grain of salt too, but Wikipedia gives the density of the photosphere as about 2×10−4 kg/m^3. That's about 1/6,000 (not a millionth) of Earth's atmospheric density at the surface (1.2 kg/m^3).
It's not clear if that density figure is an average for the entire photosphere or closer to the surface where we can measure, but if we measure the entire Earth's atmosphere, the density of our atmosphere drops significantly (how much depends on where you determine the top of the atmosphere is), but that's a problem, there's no absolute boundary, so comparing density is a futile exercise, but the ratio drops to far less than 6,000 to 1, when you take the density of Earth's entire atmosphere. You could also compare the photosphere to Earth's Mesosphere and the photosphere probably becomes more dense, but no matter how you compare, it's always going to be apples to oranges and rather pointless.
The photosphere is about 500 km thick. I don't trust the numbers enough to calculate the pressure at the bottom of the photosphere with any accuracy. If you take a 500,000 meter column at the above density, .0002 kg/m^3, that's 100 kg or 220 lbs per column, worked out to square inches (PSI), .14 psi - 1/100th the pressure on the surface of Earth - but these numbers are terrible and prone to high inaccuracy. I just put this out there to show that the pressure and density at the bottom of the photosphere is still low, but not as low as 1 part in 6000 of Earth's surface.
The gist of your question is, how can the photosphere be so light and almost vacuum like over 500 km thickness under such high gravity (28 earth gravity), and that's a fair question. The answer, as others have pointed out is due to the high temperature and content that's mostly ionized hydrogen in a plasma state. Plasma is a different state of matter than gas and it tends to be much more spread out. The outward pressure of photons may be a key factor too (I'm not 100% sure on that point).