So are the ridges caused by diet, or lack of proper hoof care, or both? I've seen horses with well-maintained feet have bouts of laminitis and ending up with the same sort of thing
Yes, all of the above
& I also should clarify that yes, hooves can suffer ridges on hooves that are definitely not due to imbalance/bad mechanics, so while I agree basically with Gotta, that's not the only reason - IME rings & ridges aren't as prominent if there aren't mechaincal issues though.
Rings, ridges, overlong hoof capsules, stretched laminae, etc are all signs of laminitic stress. This can be caused from a wide range of things. Typically it's diet related, but can be due to other gut probs, toxins or drugs, mechanics... basically any physical or even severe mental stress.
Laminitic 'events' can be very minor, with no other obvious signs that light 'growth rings', through to flaring/stretching, 'sensitive on hard surfaces', etc. This sort of degree has been generally disregarded until recently & not recognised as laminitis, however these days people are starting to recognise it as 'low grade' or 'sub clinical' laminitis. Of course, laminits/founder can also be extreme - major inflammation, pain & damage evident in 'acute' cases, to major deformity and damage of the pedal bone due to chronic laminitis(untreated, long term).