In Mach3, they serve different purposes. An MPG (Manual Pulse Generator) is basically a handwheel used to manually jog an axis. When you turn the wheel, Mach3 reads the pulses and moves the selected axis according to the chosen increment or multiplier.
An encoder is normally used to report position or movement back to Mach3, for example from a spindle or an axis fitted with an encoder. It does not automatically mean Mach3 will use that feedback to control the axis in a closed loop.
So no, you do not need to connect each axis to an encoder or MPG for normal operation. Configure an MPG only if you have a handwheel, and configure encoder inputs only if you actually have encoders whose position you want Mach3 to monitor.