Exactly, this is a problem with the "may-issue" system that California and a minority of other states use. Most states have "shall-issue": there is a specific list of objective requirements set forth by law; if an applicant meets the requirements, then the official must issue the license.
California's may-issue policies give local officials too much discretion, leading to arbitrary decisions and bribery (apparently).