Why is my homemade bread molding after 2 days?
Without preservatives in the bread your bread won't last as long as store-bought, but there are some things you can do to make it last longer:


Proof the bread longer, thus creating more acid in the bread. This
will help preserve it. 
Make sure it is fully baked and a little drier. Cool it fully on a rack before storing, allowing more steam to exit the loaf
Store it in a cool, dry, dark place.
A little extra salt in the recipe may help.
If you live in a humid area, try some kind of desiccant or dehumidifier.