Giampiero wrote:it's strange your electric system allowed the power supply even with the ground bad connection, be careful.
Can't resist a little electrical safety teaching opportunity here ...
In North America, with split single phase wiring you have two phase* wires, each 120V with respect to ground, and in opposing phase (so you get 240V across the two.) So if you were to mis-wire a plug in a manner that attached the ground wire to one of the hot prongs, and therefore attached one of the hot wires to the grounding prong, you would have an almost working machine with 120V to all the electrical components, with the current running back to the panel via the earth grounding wire. Not so good. But the really really scary thing would be that instead of a ground wire you would have a 120V live wire connected the chassis of the machine, and could get a fatal shock from touching the chassis while grounded, say to a wet floor or via your other hand on the kitchen faucet.
A machine miswired like this on a working GFCI would immediately trip the GFCI when you turned it on.
*"phase" is what you often see in the espresso machine electrical hookup instructions. AKA hot, line, live, hot legs. Wires that can shock you.