Welcome to the forums.
It lets whatever plumbing it is connected to suck air into the pipes, without letting fumes or liquid from the pipes back into the living space.
They are used in various applications. One common spot is a faucet, to prevent a connected hose from holding water when the faucet is turned off.
If it was connected to the commode, perhaps it allowed the water trapped after the flush valve to drain into to the bowl? Just a wild guess.......
But, if I am reading your post correctly, it is not connected to anything now?
Jeff & Cindy
'09 27FB Flying Cloud
'91 350 LE MH