In "Chain of Command", why did Gul Madred torture Picard even after drugging him? It was in fact true he didn't know the defense plans he was questioned about, so were they just doing it because they "may as well"? They kept him for a long time and I would've thought they would have concluded he really did know nothing.
I remember reading something that Patrick Stewart was basing his performance on Winston Smith character from George Orwell's 1984. Specifically the torture scenes in the book. I know you may be asking for in-canon answer but this is too long for a comment. Well, to my point, the torture was not for getting information but to break the spirit and force an alternate reality so Picard would not believe his own eyes (e.g. "There are Four Lights!") In the book, the purpose was so that the citizens would readily accept any reality that the government put out, as they would change reality constantly.
The Cardassians wanted something similar. That is, an important star fleet official (Captain Picard) would accept the reality of Cardassian spin of whatever goals they wanted. Hopefully someone with more information can expand on this.
Although Gul Madred's initial goal was to obtain information regarding Starfleet's defensive operations, it quickly became more than that to Madred. A man of sadistic nature, Madred no longer cared about information, but instead was concerned only with breaking Picard's will.
As we see on-screen, the torture turns into a contest of wills - one where Madred's only goal is to make Picard say there are five lights. Everything he does from that point is designed to break down Picard and make him perform that single action.
Even after knowing that Picard is to be freed, Gul Madred ignores his orders and continues to torture Picard, attempting to break him right up until the last possible second.
And, by the way, there are FOUR lights.