What is the point of the optimizer in truffle-config?

Hello all! I've been practicing deploying contracts on BSC testnet and mainnet a few times now. However, I haven't been messing with the compiler optimizer at all. Mainly because I had no idea what it does. After reading the solidity docs, I'm still confused as to when I'm supposed to be enabling or disabling it. If the optimizer reduces both code size and execution cost, when does it ever make sense for me to disable it?