What is the purpose of patent search?

The purpose of patent search before applying for a patent is of course to avoid the existing patent technology or content similar to the patent you want to apply for. If this happens, the patent application will definitely fail the examination.

If you don't apply for a patent and don't search, then the purpose of searching for a patent is hard to say, such as viewing the patent content.