Pedantic nit: PAT does have the _usage_ of the terms entirely correct, but the explanation of "opt" falls in the "not exactly" category.
"Opt" is a real word, in and of itself. It is a verb, meaning "to make a decision or choice", As in "I opted for peace and quiet, and moved to the country." The word goes all the way back to classical Latin. "Opt" traces from the root form in Latin, while 'option' (and thus 'optional') trace from combining forms of that root.
The history of the 'in' and 'out' parts of the phrases _is_ less obvious. Effectively, it comes from the same derivation, as being on the 'inside' of a group, or being on the 'outside' of it. If you 'make a decision or choice' to be part of the group -- to be included in it --, you have 'opted in' to membership in that group. If you 'make a decision or choice' *not* to be part of the group -- to be excluded from it -- you have 'opted out' of membership in that group.
When there is a simple 'binary' decision involved -- where there are only two _possible_ outcomes -- if you fail to make a particular decision, you must be 'on the other side of the fence' from where you would be if you'd did make that particular decision. e.g. if you don't "opt in", you are 'on the outside', or, if you don't 'opt out', you are 'on the inside'. Of course, life gets messier, when the decision choice has more options, e.g. choosing a 'default' Long Distance carrier for your telephone service. You don't just 'opt in' or 'opt out' -- you have to 'opt _for_' a particular carrier to be the default carrier, or expressly 'opt _against_ ' having any default carrier. In this _class_ of situation, there is no clear-cut *single* 'other side of the fence', so the 'failure to make a decision' situation does not have a single 'unambiguous' resolution. Thus, there is a need -- for any _specific_instance_ of this class of situation, to specify what happens if one does _not_ 'make any decision'. In the case of the 'default' long-distance carrier, if you do not express any preference, including not specifying 'no default carrier', somebody rolls the dice, and randomly picks one.