Well, the thing is that even if Mary was going to remain legitimate - if I remember correctly this was an option given to Catherine - if she went into a convent and let Henry remarry, Catherine still had a lot to lose by admitting to not being a virgin at the time of her marraige to Henry. She may not have known that the papal dispensation was not legal up until this point, which means she went "on good faith", but if she admitted that she was Henry's brother's "true wife", while Henry insisted that the Pope had no right to give a dispensation if this were the case, then she would have to agree that Henry can now put her away because they were illegally married, and marry someone else. And if this were the case, chances were that there would be a son to replace Mary, even if she was not illegitimate. So even if Mary was considered legitimate she would not inherit the throne as Catherine wanted her to. The only way to prevent this was for Catherine to say "Our marriage was legal because I was a virgin, therefore Henry cannot marry anyone else while I am alive". So I think that the main goal for Catherine was to prevent Henry from marrying again hence taking away Mary's inheritance.
I don't know if this makes sense, but this I think is the way she saw it. It wasn't just the fact that Mary would be declared illegal, which may not necessarily have been the case even if Catherine admitted it, but the fact that Mary would be replaced by a child who is not hers but another woman's.
In addition, she didn't want to let Henry marry another woman, even though it was clear at that time that he wanted nothing more to do with her. I think she was in denial, and kept thinking that he will get sick of Anne Boleyn and come back to her, if only she persevered long enough and not admit that the mariage may have not have been legal. Little did she know that, Anne Boleyn or no Anne Boleyn, Henry didn't seem to want to stay married to her anymore and probably would have still put her away eventually and married someone else because Henry wanted a male heir at any cost.
These are pretty strong motives to lie. I am not saying that she did lie, but they are strong motives nevertheless. I am pretty sure if she lied, she convinced herself that it was done for a noble cause, i.e. for her daughter. But I think that deep down inside, she may have done it for herself too, to prevent Henry from marrying another woman because she still loved him and didn't want him with someone else.