/opt is used as an alternate to hidden folders /usr and /lib. It is used by independent software developers to avoid conflict with system folders. If you ever use MacPorts or HomeBrew, for example, common use modular scripts, configs, apps, etc will be in there.
I would recommend against deleting any part of the OS outside your own home folder. More than one poster here has tried that, and ended up with a very expensive brick that had to be rebuilt to factory fresh before it could work again.
Mac OS's Darwin Kernel based on its BSD roots and other Unix OS' all follow a particular structure for the directories.
As correctly recommended by Jake above, DO NOT delete any file/folder that is outside of your home folder. The ONLY exception to this is the /Applications folder where you install your applications and you can delete them from there.
These 'opt' folders well represent 'optimization'. If you have installed [MacPorts|http://www.macports.org> this will create an opt folder. They're great Unix programs and I suggest that don't delete it or just leave it alone.
These 'opt' folders well represent 'optimization'. If you have installed [MacPorts|http://www.macports.org> this will create an opt folder. They're great Unix programs and I suggest that don't delete it or just leave it alone.
I forget if my 2017 MBP came with High Sierra or if I upgraded it (since I got it in December, my guess is that it came with it) and I do have the /opt folder.
Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.