//…but don’t people answer “no comment” after being advised by a solicitor?//
Yes they do. That advice is usually given by a solicitor to clients who have no viable defence. It is just about the worst advice that can be given to somebody who has a defence to an allegation. The time to mention it is when questioned, not later. You may recall the wording of the police caution:
“ You do not have to say anything, but it may harm your defence if you do not mention, when questioned, something you later rely on in court.”
The reason that it “may harm your defence” is that if you first mention (say) an alibi when giving your evidence-in-chief or under cross-examination in court the court will wonder why, when you were asked by the police “Where were you and who were you with at the time the victim was knifed in the chest?” you answer “No comment”. They may think that in the intervening time, you’ve managed to persuade one of your mates to say you were with him in the pub.
//That advice doesn't only come from a solicitor. The police tell you that "you do not have to say anything", so why are they baffled if someone keeps saying
"No comment"?//
When the police warn you (as above) they are not giving you advice. They are simply informing you of your right to remain silent and also of the possible consequences of doing so. They are rarely baffled by people providing “No Comment” interviews. They usually know precisely why their suspect has adopted that stance.