Yes, it is legal. When and even if to give a raise is up to the discretion of an employer. That is unless salary increases are required under the terms of a union agreement or employment contract. Othersie, a company can set the conditions of the workplce much as it sees fit (absent some for of legally actionable discrimination). This is called "at will" employment.