Why is my rear rack shaped like this?
I suspect it is one end of a pump holder. It holds one end of a pump. If my suspicion is true, there should be at the other end of the rack something to hold the other end of the pump. You compress the pump against a spring in the pump to attach it to the rack. This works only for pumps having a spring.
Presumably the pump that came with the bike (if it was an accessory sold bundled with the bike) has long ago gone missing. You may not be able to find a replacement pump of exact the same length.