Fun fact: in my first house, I changed it out, but the new disposal was a
different size, so the pipes didn't line up. And being a clueless first time homeowner, I was like "What's this stupid squigly pipe doing here?" so I went to Home Depot and got a bunch of screw together PVS and installed the drain directly to the sewer line without a P-Trap.
For the next 2 years in that house we kept smelling sewer smells in the kitchen, but never put 2 and 2 together that it was because I got rid of the trap.
Sold the house, the buyers inspector didn't catch it, and then later I realized what I did wrong.