In a similar way to のように
states that something is happening ‘in the manner/way of (A)’. まい means ‘every’ (coming from the kanji 毎（まい）), and will always be followed by (A). (A) being a word that expresses some kind of measurement (usually time).
is often translated as ‘almost every (A)’, ‘nearly every (A)’, or ‘on an (A) basis’.
Because I eat potato chips almost everyday, I am starting to gain weight.
I go to Shibuya almost every week.
When August comes, he goes to the peace memorial museum almost every year.
(from the kanji 様（よう）) usually expresses the ‘manner’ in which something is existing/happening, this phrase literally highlights that something occurs ‘in the manner of every (A)’, and is therefore up to the interpretation of the listener as to whether the speaker means ‘every’, or ‘almost every’.
Although みたいに and のように are regularly interchangeable, that is not the case with まい～のように. This is because みたいだ is originally an abbreviation of the more formal phrase を見たような, and therefore can sound unnatural when used to describe things that cannot be seen, like time.