I didn't see this mentioned, but I remember as a kid they tried to merge Castle with characters and story similar to Ninjago with Knights Kingdom!... II?
Not the Bionicle-esque, but there was an iteration of the characters that had names and unique personas. I don't recall if they had a show or not, but I always thought Ninjago was another series in this style.
The bionicle hybrid never interested me, but I did have a few of these sets prior to the proper Castle/Fantasy series that followed this. Considering they abandoned this character-driven concept for their next series, I'd wager they didn't see the sales results they wanted.
After this, I think the Castle and Kingdoms did ok, right? I remember not being into the red/green of Kingdoms, but it's grown on me over time. I might even go back to pick a few up now that I'm thinking about it. The only issues is the most coveted sets of those series, the Medieval Market Village (10193) and Kingdom Joust (10223), were filled with the notorious pieces I made my username for.
After that, you have 2 of my least favorite castle series out there; the most recent Castle run, and the Nexo Knights.
While I can just say simply Nexo Knights wasn't my thing, so I don't think too much about it, the last Castle run was just awful. I have a bad feeling it gave Lego the impression kids don't want to play with Castle anymore, but really I think it was down to the design. Squeaky clean vector art lion logo on the shield with painfully plain color combinations made it about the least visually appealing Castle series I can think of. I'm not sure if they wanted to move into a younger demographic, or wanted to try a "safe bet" with a by-the-numbers Castle run, but the hard left turn that was Nexo Knights tells me they didn't get the profit they wanted out of the series.
In summary, you have the failure with Knights Kingdom as a character-driven series in the early/mid 00's (though was probably related to the wild ride it on from bionicle to classic lego), a faceplant with their most recent medieval/fantasy castle line that may have indicated a lack of interest (over a lack of creativity on Lego's part), resulting in "the kids just aren't into castle anymore. stop production."
I think it'll take a lot of imagination to get Castle back into the spotlight, but if you look at the origins of Ninjago with Castle Samurai from the late 90's compared to the most recent Ninjago lineup, I think it can be done. Lego has to see an opportunity there again, but there's still tons of great old Castle to collect in the meantime... and the medieval blacksmith featuring updated black falcons was nice this year. There's also some hope Lego could do a 3-1 like they did with the $100 Pirates set in the Castle theme, as this seems to be the perfect avenue to revisit old themes without developing an entire line.