Request to also explain the logic in comment section!

I see a lot of people while discussing the problem on the editorial post often write I did this and then see my code.
It would be really helpful if you explain it a little bit otherwise there is no point.
Why is everyone so excited to show his code??
here something like this comment
I also want to say that I am not targetting anyone personally and this is just a random comment I picked.
There are always few replies to these comments to explain a little bit.