It is, in fact, legal more places than not. Cousin marriage was extremely common for thousands of years. It only really started to drop off when people started owning cars and could meet people from further away. Most places still haven't changed their laws because the cultural change was so recent, and because it's low risk enough that it's not a serious concern if it's just once in a while rather than, say, medieval European royalty shenanigans.
And at this point, with all of the toxins from food processing/preservatives and the plastics getting into our bodies, the added risk is probably negligible.