Sensor Detects Grey
The Bayer filter is required because the image sensor elements can only detect intensity, not color. By recording the intensity of light passing through individual Red, Green and Blue filters, color information can be saved. This data is also knowned as RAW image data.
RAW image data needs to be processed to produce color images, but saving the RAW data has an advantage -- it has 14-bit intensity resolution. This is 64 times as much precision and dynamic range as what is available with the camera's default JPEG image files.
The conversion from RAW data to RGB color data is possible because the RGB Bayer pattern is consistant withing, at least, camera manufacturers.
This RAW pixel pattern was generated by computer from the previous blurred image and the displayed RGB Bayer pattern. It was easier to generate the RAW pixel intensity array pattern and an original RAW image file was not available. However, this image is a good representation although the display image file is only 8-bit not 14-bit like the camera. This difference would not have been visible anyway.