I have issues with both of these sentences. Two of those issues are the same for both sentences. Using the second sentence as the example, the odd placement of "or" lends ambiguity to the reasons why these organizations strive. That is easily remedied by this change:
"Many organizations strive to reduce production loss or to reduce costs to gain an advantage over their main competitors ..."
This makes it very clear that both of these things are done in an effort to gain an advantage.
On a technical note, having studied accountancy, I would like to point out that both of these things, not just one or the other, are most likely done by prudent managers looking to gain an advantage. The sentence really should use "and" instead of "or" so that it reads "strive to reduce production loss and to reduce costs".
The second problem I have with both sentences is the use of "only few". The phrase "only a few" "only a very few" or "very few" or even just "few" are the more commonly used phrases.`
With that, the sentence becomes:
"Many organizations strive to reduce production loss and to reduce costs to gain an advantage over their main competitors, but only a very few do so."
That's a much simpler and more elegant sentence. It showcases the major thought, which is gaining an advantage over competitors. Not reducing loss or reducing costs, or how well you reduce them.
The first sentence has exactly the same issues, plus it has the very awkward repetition that others have mentioned. It's clumsy and unwieldy. I would just head for the scrap heap with the first sentence in tow and never speak of it again.