The best-case scenario is to align personal career growth goals (e.g., senior engineer wants to be a staff engineer, or engineer wants a big raise) with company objectives. Company objectives are typically realized on a longer-term time horizon, which could be several years long. Goals, in their best-case scenario, should be a contract between company and employee that says "if you change and grow in this way to help me, I'll help you back."
Ideally, a good manager should use their experience and vantage point in the business to help their team members set good goals that both align with the company's long-term growth plans and their employee's personal growth plans.
Where these things go sideways: * an manager-type has set goals for a team that are tied to their assigned goals from their manager, and they are hoping by setting goals with their employees to shift responsibility onto them. (example: if manager's boss wants the team to be proficient in Rust by end of year, that should be something that I as manager just assign out as tasks and give you time to do) * manager and employee don't effectively communicate on employee's growth plans, so the goals are lopsided. (example: employee is trying to spend more time with one-year-old daughter this year. Their personal goal is "leave office at 4:30PM every day." Manager ignoring this goal is bad.) * manager is not very good at handling differences between growth plans and fails to communicate those issues to employee. (example: employee wants to get better at a legacy language that is on its way out at the company, and employee also wants to get promoted. These two goals may be in conflict.)
Goals should be a way for employee and manager to align employee's personal desires with company's objectives. For many reasons - most due to questionable managers - this is often lost.