Lawyers don't have to go to court.
-Litigation is one type of law.
-There are other specialties that wouldn't involve representing a "client" in court.
Examples of occupations
-Lawyers can work for the "state" representing the state in cases. (they would go to court)
-Lawyers can represent those who cannot afford an attorney - public defender. (they would go to court)
-Lawyers can work as "in-house counsel" and perform a variety of functions (e.g. contracts, human resources, litigation, etc) (they may or may not go to court)
-Lawyers can work for law firms - law firms provide independent legal advice for a fee. Law firms can specialize in a particular area of the law or have a varied practice where a large group of attorneys cover several specialties. (some of these lawyers may go to court)
I am what is referred to as "in house counsel". I've worked for the same firm for many years (even before I went to law school). In my current role as legal counsel for the firm, I don't need to go to court. I review and negotiate agreements and my client is a corporation, not a person.
Best wishes in pursuit of your career!
I practice in Hong Kong and the system is split up between solicitors and barristers (usually court work). Solicitors at the international firms would often specialise in corporate finance given Hong Kong is an international finance centre. This will involve e.g. mergers and acquisition deals, syndicated loan deals, debt market bond deals, initial public offerings etc. The local (smaller) firms may specialise in commercial, family, conveyancing matters etc. Generally barristers will attend court hearings.
There are actually many more lawyers (in a city like Hong Kong that is, like New York, a major commercial centre) who do not go to court and instead practice corporate/finance/other matters.