a) If you consider SQL standard , HAVING clause is not allowed without GROUP BY clause since in the execution flow , HAVING clause condition is imposed on the table group wise.The grouping of records is done based on attributes mentioned in GROUP BY clause.However , according to MySQL standard , it is allowed.Here one record is treated as a GROUP and HAVING clause is imposed hence.
b) Secondly , the columns (or) the attributes mentioned in the GROUP BY clause must be mentioned in SELECT clause along with aggregate functions , if any , like sum() , avg() etc. else it will violate the tabular structure.So yes the attributes mentioned in GROUP BY clause must also be there in SELECT clause.