ATIS not Matching METAR

Weather is really inconsistent. You was lucky to have MB clouds at 12000 ft even if METAR was saying CAVOK. In my above example I had blue sky even if ATIS (MB) was saying broken 13500 ft and METAR CAVOK. We don’t know the blending logic of METAR with MB.
Also it would be interesting to have the input from a real-life controller or pilot about the information source for ATIS. Is that coming from the local METAR at the airport or another type of observation ?, to understand if ATIS has the same limitation than METAR to report clouds only until a specific altitude.

As per Wiki: CAVOK is an abbreviation for Ceiling And Visibility OK, indicating no cloud below 5,000 ft (1,500 m) or the highest minimum sector altitude and no cumulonimbus or towering cumulus at any level, a visibility of 10 km (6 mi) or more and no significant weather change.

Update: I found this page from IVAO saying that ATIS is only reporting clouds below 5000 ft (like METAR): ATIS - IVAO - International Virtual Aviation Organisation, so I assume ATIS data source is coming from current METAR data and so should not report any cloud layers above 5000 ft even if existing.