I find the comparison really odd as someone in the opposite position - I had formal classical piano training from 8 years old until I gave it up during college, and later learned how to code entirely through copying other people's code and Stackoverflow in my mid 20s. Piano to me feels much more like a sport, in that there's a very visceral, physical aspect to playing, and in turn a ton of effort goes into optimizing everything from where your fingers should be placed to how hard or soft one is striking a key. Practicing is effectively comparable to training for some sort of non-team sport much more than anything else. I don't have perfect pitch, but learning how to read music is a very small part of the whole experience, and I would think that as an adult someone learning piano will find the physical aspect, particularly the finer motor elements, to be the primary hinderance to being really great. Writing code is entirely different in that it feels much more like learning a subject matter, and there's neither something akin to the apotheosis of the particular thing you're working on that you aim to emulate, nor hard boundaries as to determine your proficiency through performance. It's cool if your code doesn't work when you test it, you can fix that. It just feels like apples and oranges in the experience.
If you're picking up basketball at age 30, I hope you know that you're never going to be anywhere nearly as good as Curry, or Lebron. But you can definitely pick up a subject matter and become an expert later in life. Heinrich Schliemann essentially began his archeological career at age 36 and yes, basically excavated Troy in the worst way possible, but managed to actually excavate Troy. That's the difference between an adult piano learner and an adult code learner, I think.