The intent is that you must learn the earlier levels of anything numbered (Ability #5 requires knowing Ability #4 ), and similarly for any recipes with clear level steps ("Decent" is a prerequisite for "Nice" recipes). When you find a case where that doesn't happen, it's just a data bug, please report it in game!

(And yes, we've gone back and forth on the pros and cons of this during development, which is where lots of the data problems came from: different iterations of ideas. There are some quality-of-life benefits to letting you learn recipes out of order, but ultimately I decided that the negatives far outweigh the positives. For a long time I was trying to find a way to hybridize it: to let you learn the low-level recipes out of order, but then start having requirements at 50 or 60. That change is too abrupt and unintuitive, though, as this thread shows! So now all recipes should have their earlier versions as a prerequisite.)