MySQL doesn't promise which value from non-grouped columns will be in the result set unless you specify using a WHERE clause or AGGREGATE function (or possibly a JOIN condition).
Speculating a little, having never seen any documentation to indicate how it chooses which value to include, my assumption is that it uses row order within the most relevant index.
Hence, it's reasonable to assume that SELECTing colA, colZ versus SELECTing * might trigger MySQL to leverage different indexes when compiling the result set, altering the "perceived" order of the rows, and surfacing different values.
If you were using a WHERE condition, this wouldn't matter. WHERE conditions are applied before grouping. But, as you're using a HAVING condition on a non-grouped column with potential variation in that column, the discrepancy you're seeing is expected behavior to a large extent.