Dome light issues

I think it's getting power thru the door switch full time(bad door switch), and grounding it completes the circuit?

I wondered that but they work as they should when the socket isn't screwed in and grounded.... Door switches operate dome light as expected, as does the courtesy switch on light switch. I will order new ones as these have some rust.