磨洋工 Why 洋(?)工? Lazy Foreigners?
I think the answers so far are from people who have never done construction work.  I have.  I take the same story from Baidu as cited by Drunken Master and kxxoling.  

The process of smoothing (磨) the bricks does not only take a lot of time.  More importantly, it is easy for workers to relax and stretch out the time by simply not pushing very hard as they do it. That way they all get paid more for doing easier work.

The boss whether foreign or Chinese can immediately see how many bricks someone is carrying, or how many they lay.  And he knows what to expect for such routine work.  He cannot as well see how hard people are trying as they grind bricks smooth -- or tell how quickly a given wall should be ground smooth.  Especially a foreign contractor or top boss will not know what to expect for this novel process.

The story concerns workers on a well-funded foreign construction project (洋工), in Beijing, and the funders were willing to spend lots of money to get it "一丝不苟" perfect, as http://ybkk.blog.sohu.com/301356259.html expresses it. That blog has pictures and adds other details of the building.  

I take the point to be that "polishing bricks on the foreign building" became proverbial for taking it easy on the job.