I have read a lot about global and rolling shutters, and it seems from what I have read that the global shutter is better than the rolling shutters when it comes to moving objects. On the other side it seems that a lot of smartphone companies uses rolling shutters and I really don't understand why. What is the advantage of using rolling shutters, if any?
The primary question is, "Why do smartphones use CMOS instead of CCD sensors?"
Due to the way they are wired, CMOS sensors read out sequentially. This results in rolling shutter type artifacts. CCD sensors, on the other hand, dump the information from each pixel simultaneously into a buffer which is then read out while the pixels are capturing the next frame. The biggest constraint to using CCD sensors in smart phones is that they are much more expensive to manufacture than CMOS sensors. This is especially applicable at the higher camera resolutions now appearing in smart phones. There is a reason high end video cameras with 3 separate CCD sensors (one each for Red, Green, and Blue) cost as much as many cars. And HD video is only about 2MP!
Cost and complexity. CMOS sensors are much cheaper to produce than CCDs and have a rolling shutter as a characteristic of the sensor itself. It isn't that rolling shutter is preferred to global, global shutter is always better from a performance standpoint, however the cost and complexity is often not worth it for the needs of a particular device.
Particularly, when dealing with a camera intended to take stills or fairly static video, a rolling shutter doesn't offer much disadvantage, but can be produced much cheaper, thus it is selected over a superior quality global shutter.