Right answer, no reason

I make websites for a living and apps for fun. Coding is satisfying because it is abstract problem solving, the answer is usually not up for debate, it either works perfectly or not well, or not at all. So when you do find the solution there’s a bit of magic, a eureka moment. Today I found a solution to a problem I had spent hours on. The solution works perfectly, like magic, but makes absolutely no sense to me. I came across it by guessing, just throwing the dice after trying everything else. I still don’t get it, maybe I never will, but does it matter? Sometimes magic is magic.