In the US we deduct certain things from income to calculate how much of our income is taxable. Rather than have everyone list out all applicable deductions people can choose to use a standard deduction. The amount of the standard deduction varies by year based on filing status and whether or not the filer is a dependent.
Regardless of your filing/dependent status $1,800 of earned income is below the standard deduction. If that was your only income you would pay no federal income tax and it would make sense that little/nothing was withheld.
When you fill out a W4 there are instructions for calculating how much should be withheld if you have multiple jobs. Each employer has no idea what you earn from other sources, so they basically assume that what you earned in the current pay period times the number of pay periods in the year is your annual income (you can check out the IRS withholding tables/instructions for more detail).
In this example, since $1,800 of earned income is below the standard deduction they correctly withheld as if you would owe no federal income tax. The $2 withheld is likely from one or two pay periods where you earned more than other pay periods. In your case with a relatively small amount of additional income this is not a big deal, but in general with multiple sources of income it is best to run through the W4 instructions to ensure enough is withheld to avoid penalty. Per the IRS regarding Penalty for Underpayment of Estimated Tax:
Generally, most taxpayers will avoid this penalty if they either owe
less than $1,000 in tax after subtracting their withholding and
refundable credits, or if they paid withholding and estimated tax of
at least 90% of the tax for the current year or 100% of the tax shown
on the return for the prior year, whichever is smaller.
I have seen situations where employers failed to withhold the additional amount that an employee indicated should be withheld on a W4, and other errors certainly happen, but withholding errors seem fairly rare (probably more likely in smaller companies that haven't outsourced payroll).