We should be careful not to repeat mistakes of the past which valued form over function. Animation can and should be used to enhance the user experience of your website or application, however it’s very unlikely that a purely cosmetic animation effect will make for a better product.
Long running network requests offer a perfect opportunity to use animation as a form of smoke-and-mirrors which results in lower perceived wait times.
Be careful not to repeat the same mistakes of the Flash era.
Source: Stop Gratuitous UI Animation