It's appropriate in a technical or legal context (which would often be a type of formal context), where the precision of indicating that you mean "X or Y or (X and Y)" is desirable.
"X or Y" can be validly interpreted as "X or Y or (X and Y)" or as "X or Y but not (X and Y)". Mostly we get by judging which is meant from context, but in legal and technical contexts such misinterpretation could be costly, if not disastrous.
Such contexts also tend to be explicit in the other direction - if they mean "X or Y but not both" they will make sure to include that "...but not both". They may also emphasis an either and an or with bolding or similar.
Such contexts are "formal" by some standards, but different to some other types of formal prose, in which it should probably not be used. This can include different passages in the same work: It may be appropriate in an item list giving a break-down of a process, but not appropriate in accompanying paragraphs.
In informal use, you can of course do whatever you want. Such use would be rather slangy, and like all slang some people will like it and some will not.