Double quote marks are because it's inside a string already (format command). They make sure the marker name is a string and not a variable ("mkpos1" vs mkpos1).
%1 is part of the format command, it is replaced by the first value given to it. In this case our first, and only one, "ceil(random 3)", which returns 1, 2 or 3. So, the %1 is replaced by either 1, 2 or 3 and giving us "mkpos1", "mkpos2" or "mkpos3".