Lawyers often give those services through public interest programs for free in exchange for advertising.
Such services are usually provided by lawyers through various public interest programs at no fee or a reduced fee as part their ethical commitment under the Rules of Professional Conduct.