I've asked my professor this before. It has to do with the geometry of the reagents. It's best to make models of them. for example, when 1,3-cyclobutadiene reacts with maleic anhydride you will only get endo product , absolutely no exo product. The compounds can't form bonds to make the exo product, it will have to bend in a different way.
Also, exo vs. endo products also have to do with your reagents being cis or trans. When 1,3-cyclobutadiene reacts with maleic anhydride, one of them is always cis, which is also why you get only endo and not exo. It's much easier to "see it" in 3-D.