Why there is no single definition. Congress uses "earned income" as a gate for rules that exist to reward or accommodate work, and each rule draws the line where its purpose needs it. The definitions agree on the core, pay for services, and disagree at the margins.
The earned income credit. Section 32(c)(2) counts wages, salaries, tips and other employee compensation only if they are includible in gross income, plus net earnings from self-employment figured after the deduction for half of self-employment tax. It excludes amounts received as a pension or annuity, pay for work done as an inmate, and certain subsidized work-program pay, and it ignores community property law. Nontaxable combat pay is excluded unless the service member elects to count it, an election that can raise or lower the credit. The IRS's own list also counts certain disability benefits received before minimum retirement age.
Foreign earned income and the kiddie tax. Section 911(d)(2) defines earned income as "wages, salaries, or professional fees, and other amounts received as compensation for personal services actually rendered", and when both capital and personal services produce a business's income, only a reasonable allowance for the services counts, capped at 30% of net profits. The kiddie tax borrows this definition: section 1(g)(4) starts from the part of a child's adjusted gross income "not attributable to earned income (as defined in section 911(d)(2))", subtracts two threshold amounts, and taxes what remains, the child's "net unearned income", at the parent's rate.
The dependent's standard deduction and filing requirement. A person who can be claimed as a dependent gets a standard deduction equal to the greater of a minimum amount or earned income plus a small add-on, both indexed for inflation, capped at the regular standard deduction. For this purpose and for the filing requirement, IRS Publication 501 treats taxable scholarship and fellowship grants as earned income. The kiddie-tax rules do not, so the same scholarship can be earned income on one line of a family's planning and unearned income on another.
Self-employment. Section 401(c)(2) defines a self-employed person's earned income as net earnings from self-employment from a business in which personal services are a material income-producing factor, reduced by the deduction for retirement plan contributions and the deduction for half of self-employment tax. That figure sets how much a sole proprietor can contribute to a SEP, SIMPLE or 401(k) plan.
IRAs use "compensation". Section 219(f)(1) says compensation "includes earned income (as defined in section 401(c)(2))" and does not include "any amount received as a pension or annuity" or deferred compensation. It also includes differential wage payments to reservists on active duty and taxable amounts paid to aid graduate or postdoctoral study, and section 219(f)(7) counts nontaxable combat pay. So a retiree whose only income is a pension and investment income cannot make an IRA contribution on the strength of that income, while a graduate student living on a taxable stipend can.
Credits that depend on it. The child and dependent care credit limits the expenses that count to the earned income of an unmarried claimant, or of the lower-earning spouse on a joint return (section 21(d)), with a deemed amount each month for a spouse who is a full-time student or unable to care for themselves. The refundable part of the child tax credit is figured from earned income, as section 32 defines it, above a statutory floor.
Outside the income tax. The retirement earnings test that Social Security applies, Supplemental Security Income and SNAP each count earnings under their own statutes and rules, which overlap with the tax definitions but are not identical to them.