A UNIX White Paper from about 15 years ago defined the opt structure as the preferred installation strategy to try to straighten out the discrepancies between common practices for BSD vs. ATT UNIX.
I've only seen it enforced in HP-UX, but I haven't seen everything.
opt stands for optional - any software not in the original distribution.
/etc (pronounced ET see) is where configuration data belongs.
/var is the machine-specific area for data, variably sized and mounted by sysadmin.
Therefore, on a well-behaved, conforming software package named, for example only, XYZ, we get the following directories -
/opt/XYZ - the XYZ software
/etc/opt/XYZ - all configuration/setup data for XYZ
/var/opt/XYZ - data generated by running XYZ
On a BSD system, /opt is the same as /usr/local/bin (bin is pronounced bine, as in binary, and not pronounced like a vegetable bin).
There, some info for its own sake, hope it serves.