What does encoding do?

Does anybody here know what encoding’s real purpose is for? Is it a necessary step to my video project if I would like to upload it to a video sharing website?
Thank you

Encoding is the final step to turn your project into a video file that can be played by another program or device.

For example, imagine that you use 4 .mp4 video file clips to create a video. Maybe you edit the clips and add some effects to make your video interesting. When you are done editing, you can save your Shotcut project as a .mlt file, but nobody will be able to play it on their file or device. If you export the project as a .mp4 file, then you can share it by uploading it to a file sharing site or by uploading it to YouTube.

It should be noted that the most recent version of Shotcut changed “Encode” to “Export.”