Why have ground beetles never evolved the ability to get back up?
By "floor", I'm assuming you mean a smooth floor like that inside a house or building.  I imagine that these beetles are actually quite good at flipping themselves over when they have something to grab onto -- e.g. a blade of grass, a fallen leaf, etc.  The detritus-free environment that is the modern indoor floor (or smooth path, or paved road) is not part of the natural niche of these organisms, and encountering such surfaces was uncommon in their evolutionary history.  Rare encounters are weak selective forces.