They were effectively power generators with legs and a very simple AI so they could understand rudimentary commands. They were commonly found on under-developed worlds that did not have an expansive power grid, or in mobile military operations.
As per Wookieepedia.