Does not mean a converted garage was built to code, if the city has come knocking you definitely have an issue.
Also what is surprising is what caused the city to come knock, clearly either a neighbor has complained, or yup have too many people living, someone or some action of yours has prompted this action.
Depending on whether you home warranty covers such permit issues. Generally, there is a warranty an agent provides that may or may not cover such issues, but it is good for only one year.
While in all your postings you harp that you used a realtor, that is great, the fact is that on the purchase agreement it clearly states that it is the owners responsibility for checking the permits. Clearly, you cannot say you did not realize the garage was converted when you bought it.