But when you edit a photo and then export it, it has less weight
What Quality are you exporting it at?
To explain: Jpeg is not a photo format. It's a compression format. Your camera takes a snap, saves it as a tiff or similar and then compresses it into a jpeg, to save space. Worth noting is that in most cameras you don't have a choice in the amount of compression used.
When you edit a photo in Photos (or similar apps) you never touch the original. A new version of the image is created based on your decisions taken when editing. When you go to export, a new file is created and, just like your camera, that is compressed into a Jpeg. However, in Photos you can choose the amount of compression. As stated above, the highest quality uses the least compression, and so you get the "heaviest" file. Therefore it is quite possible to export a larger file than you imported... not because you've added data, but because you've used less compression.
Experiment with the Jpeg quality settings and compare the results.