UI - Moto G has a neat and clean UI and better than Samsung.But you'll find the camera interface of the Moto G is basic.Samsung does comes with bloat.
Display - Samsung comes with AMOLED display.Amoled display does have deep black levels(as i'm using one), and on the other hand Moto G3 have IPL panel which is much brighter.AMOLED display does not use much battery as the display saves some power, On IPS it does use heavy power.
OS - Moto G3 is upgradable to android M while Samsung may will stuck on lollipop forever.
IP Certification - Moto G3 is IPX7 waterproof certified and can take splashes of water(but can't be submerged into water fully), but Samsung A5 is not IP certified.
Form-factor - Moto G3 is somewhat more in weights but offers a firm grip but samsung does not.
Camera - Both does well on that price bracket.
Choose as per your needs.