It didn't have to be really good: It was better than any other digital music store out there!
Apple had some good UI ideas in the past. For a fleeting moment, they were the best. But eons ago they sold out the user to sell him a lifestyle/subscription system built around keeping people from leaving. This vastly compromised their UI designs to the point of making them frustrating and sometimes futile.
https://discussions.apple.com/thread/250315803
Software that loses data it fetched or produced is an accident. Software that actively search for and deletes data it has nothing to do with (in backups!!), is malware. People went to jail over such things.
Why specifically do you hold iTunes in such low regard? The bolt-on, beyond-music functionality has always sucked, but I didn't find it wanting from a music management POV. (Although I never used it for ripping. dBpoweramp for me, thank you.)
As far as the raw UI, they were shown to the door by Zune which was a massive failure! Couldn't Apple with its money and music business success have made Zune or something even better? Of course they could. They had an early lead. My point is they chose not to because openness and control in music (or anything else) is antithetical to their business model. This adversarial view of users is also what lead to terrible iTunes bugs like eating your music, which others also recall well.