Why does real depression cause physical pain?

Pain is complex. Feeling pain is not a simple matter. Many factors affect its sensation, from conditions at the pain site (eg, skin surface), along the nerve pathways (eg, up the arm), etc. Once in the brain, alertness, "focusing" on it, distraction, needing to deal w an emergency, etc, all affect pain perception. Depression often highlights/magnifies pain perception by affecting these brain modulators.