This is what I'm thinking. I have no realistic way of proving it. Like in no way would I want to work in a culture like that. It just feels kinda slimy. Like "your ideas are valuable, but you're not."
I don't think they should be obliged to hire you just because you had this one idea that helped them.
It's possible they were not interviewing you in good faith, but just wanted free advice. But that's impossible to prove, and several other explanations that don't require bad faith are entirely plausible.
Name and shame them, OP.
But would be a total psycho with an exhausting life for most people... So best to just learn that ideas are a dime a dozen, dont give them out for free if they are good