Brazil is expensive. Anything you import (read: parts for equipment) is taxed at least 50%. And they have tightened their requirements for “national content,” meaning they want things manufactured in the country.
My company experienced all of this first hand. I can see where investors, given other options, would take them.
In 2010, I was working on preliminary for 4 new refineries. The national content requirements were strong then, but I remember it as 15% import tax, and that was on anything, including intellectual property like process and design drawings. We had to work-share with Brazil engineering/design firms or could not get the work.