That's what I suspect was the reason for the unusual charge.
The powers that be are under pressure to show they're doing "something" about people who come back from fighting in the Middle East but since this wasn't for a terrorist organization, there was no obvious charge. I'd argue it was right for them to search his belongings given the circumstances, but then they decided to try and pin it all on owning the cookbook as that's all they really had.
Not that I think this was the right call for them, but I can see how it might happen, and also why the millions of others who've downloaded the cookbook out of curiosity have not ended up in court.