How and why do the characters speak Japanese? In Ente Isla they have their own language, and I don't think the people there (especially the ones living on the land) know anything about Japan or Earth. So how could Emilia, her father and that one guy carrying that cart (in the flashback) speak fluent Japanese?

And if they actually know Japanese, why don't they speak it all the time?
The people from Ente Isla do not speak Japanese.
They are simply shown speaking Japanese for the convenience of the audience during the flashback.

The moments where they are shown speaking their own language instead of Japanese are when they are chanting spells, which might not be able to be cast in other languages, or when it is necessary to remind the viewers that they come from a different world.

When Maou and Alciel had just arrived in Japan, they did not know the language, so it is important to demonstrate the language barrier to the audience.

During Emi's flashback, all the parties involved spoke the same language, so there was no need at all to show a language barrier, instead it is easier to make the whole scene in the audience's language.