I am confused as to why the following products exist:
Why is Microsoft selling physical media games for Series S when there is no disc drive on Xbox Series S?
Why Microsoft is selling physical media games for Series S
They're not. If you look more closely at the box art, you'll notice that these games are for Series X. There is no mention of "Series S" at all.
Microsoft Flight Simulator only mentions Series X (also notice the Series X logo in the upper right corner):
Just Dance even mentions the old Xbox One, but still no Series S:
You are confused because the shop you've visited (which I presume is digitec.ch) didn't properly label those products. They might not know about the Series S' lack of disc drive, or they didn't think about it when they created the labels.
For the reference, here's what the Series X|S logo looks like on the Microsoft Flight Simulator store page on xbox.com (note that this is an official Microsoft store which only sells games digitally):