Because it’s enjoyable to build things. It’s like solving a puzzle or riddle: there’s no purpose other than the experience of solving it.
I think I just don't "get it" and my pov is probably colored by frustrating interactions that I have at work where people do the similar things in code shared by others, to (seemingly) demonstrate "their skills."
Maybe that's simply the way it is, maybe you'll just never understand why other people do for pleasure things that you see no point in.
Sometimes it's just fun for them.
I occasionally ride a unicycle and juggle, just for my own satisfaction.
Do you do anything for fun?