Firstly, I think that you have misinterpreted 'if or only if'. That actually means two things, i.e. 'provided that' can mean 'if', and it can also mean 'only if'.
Yes, it is slightly more formal. It also makes the 'if' more distinct and clear, to make it more important in the sentence.
I suspect you might find that it is often used in speeches, and that the examples you have seen come from reported speech. That is because it is easier to verbally stress 'provided that', compared to 'if'.