Because they were giving advice about a legal matter, so by stating what seems obvious to you and me, the GP is covering themselves from "implied" lawyer-client relationships which under some jurisdictions could adjudicate them the responsibilities of a lawyer to a client if a person could prove in court that they reasonably believed they were acting as their lawyer.
I don't know if this is actually been a problem ever brought to a judge to be honest, but that's the reason why that disclaimer is made and of course, I am not your lawyer.