Why would the stroma have a higher pH during photosynthesis?
Energy from an electron transport chain is used to actively transport protons from the stroma to the thylakoid lumen. Thus the lumen has a relatively higher proton concentration and therefore a lower pH than the stroma.

Higher [H+] means lower pH.

Lower [H+] means higher pH.

Keep in mind that the flow of actively transported protons from the stroma to the lumen is against their concentration gradient. There wouldn't be a net flow of protons this way without active transport.