Having a machine that plugs into a properly grounded outlet is not a problem. Having to plug the machine into an extension cord, just so you can reach the nearest receptacle is a problem.
In an ideal world, you would have a permanent branch circuit installed with wires in conduit and with a receptacle close to the machine needing power. This is better than having to add the extension cord for several reasons. First, it is less susceptible to being bumped or cut or otherwise damaged by persons or machinery in the area. Secondly, you don't have to worry about anyone tripping over the extension cord or having the extension cord become entangled in any other way. Third, when a permanent branch circuit is installed and a receptacle is placed near the machine, the size of the wires will be selected in accordance with NEC rules, so that you know they will be able to handle the load. On the other hand, there are many types and sizes of extension cords, and it is difficult to make sure that the one installed at any given machine is sized properly for the load that the machine will impose upon the extension cord. Finally, the amount of damage it would take for an extension cord to present a shock hazard is not very much, and might not easily be seen or otherwise detected before someone gets hurt. On the other hand, the amount of damage it would take for a permanent branch circuit (installed in conduit) to present a shock hazard would be very substantial, and easier to detect.