According to the documentation located here, it says that Polymer.flush() forces several classes of asynchronously queued tasks to flush.

So, when you do dynamic changes that affects ShadyDOM distribution or perform some async operations (like insert, append, remove) or there is dynamic DOM changes (like upgrading elements and calling attached/detached) , Polymer queues them and processes those changes.

Calling Polymer.dom.flush() ensures that these tasks complete synchronously.