Excuse my newbism, but what exactly does lens for 200$ on action cam do ? i always thought people are replacing action camera lenses so they avoid having distortion-fisheye, am i missing something ? isn't the sensor in camera in charge of megapixels, color,... etc. ?
There are enormous differences in the qualities and capabilities of different lenses, even if these differences may not be immediately discernible to the average user. The lens on a 100 dollar point and shoot camera may be able to take perfectly acceptable, even excellent photos but it cannot begin to approach the optical performance of say a Vario-Summilux lens on a Leica D-Lux camera.
Lens performance is determined by its ability to optimize attributes such as sharpness, contrast, lens flare, Optical Transfer Function, resolution, color correction, edge to edge sharpness, barrel and linear distortion, chromatic aberration and other characteristics as may be required, such as flatness of field.
All of these qualities are determined by the optical design of a particular lens (the number and types of elements and their configuration), the quality and types of glass, the quality and types of coatings, the barrels and mountings they are deployed in and the precision in which they are manufactured.
By their very nature and size, M12 lenses (also sometimes referred to as micro lenses) have somewhat compromised performance. Originally, they were used primarily in CCTV cameras and for machine vision where basic performance was all that was required. That has all changed now with the advent of HD technology and the introduction of miniature high performance video cameras such as the GoPro. Newer and better lenses are coming to the market all the time to meet the enhanced capabilities of newer imaging platforms (sensors).
As I mentioned above, action cameras are now being used professionally in many areas including film and TV production, as well as commercial/industrial/scientific and agricultural use. Many professionals using action cameras have very exacting requirements for their work and this often involves very demanding optical performance. One area for example is survey mapping using drone platforms along with ground based calibration targets and very specialized action cameras that are sensitive to specific wavelengths of light. For mapping purposes, lenses are required that allow for making accurate and detailed measurements from the air. Another highly specialized use is for monitoring agriculture for such things as crop growth and the health of forests. These cameras can discern between healthy and diseased trees, for instance. Yet another use requiring extremely well corrected lenses is in utility work and bridge/infrastructure inspection where detail and accurate measurements are also important factors. You need the proper lenses for this kind of work.
So anyway, to answer your initial question about what a 200 dollar lens actually does on an action camera, Peau Productions custom designs their own M12 lenses to their exacting optical requirements and one of the main things they have achieved is to provide a level of performance that was previously only achievable with much larger, heavier lenses such as C mount but can still fit inside typical action cam waterproof housings and chassis. They also supply custom designed software to match the characteristics of the lenses they sell.