I want to point that rought code is expected from junior developers in general, not only "offshore" devs.
It is sad that developers from global south usually have to perform at a much higher level than their peers at the north, just because unfounded prejudices.