There is a note attached to the relevant section of the Revised Code of Washington. It used to be "not more than one year", but in 2011, Substitute Senate Bill 5168 changed this and many similar instances to "up to 364 days". They explained their purpose in the first section of the bill:
The legislature finds that a maximum sentence by a court in the state of Washington for a gross misdemeanor can, under federal law, result in the automatic deportation of a person who has lawfully immigrated to the United States, is a victim of domestic violence or a political refugee, even when all or part of the sentence to total confinement is suspended. The legislature further finds that this is a disproportionate outcome, when compared to a person who has been convicted of certain felonies which, under the state's determinate sentencing law, must be sentenced to less than one year and, hence, either have no impact on that person's residency status or will provide that person an opportunity to be heard in immigration proceedings where the court will determine whether deportation is appropriate. Therefore, it is the intent of the legislature to cure this inequity by reducing the maximum sentence for a gross misdemeanor by one day.
In federal law, 8 USC 1227 (2) (A) (I) provides that:
Any alien who—
(I) is convicted of a crime involving moral turpitude committed within five years (or 10 years in the case of an alien provided lawful permanent resident status under section 1255(j) of this title) after the date of admission, and
(II) is convicted of a crime for which a sentence of one year or longer may be imposed,
is deportable.
The Washington State legislature didn't think that deportation was an appropriate punishment for an alien who committed a gross misdemeanor. Therefore, they reduced the maximum sentence by one day so as not to trigger deportation under 8 USC 1227 (2) (A) (I).