What does Matthew 5:46 mean?

Matthew 5:46 KJV
For if ye love them which love you, what reward have ye? do not even the publicans the same?

Matthew 5:46 NKJV
“For if you love those who love you, what reward have you? Do not even the tax collectors do the same?

Matthew 5:46 MKJV
For if you love those who love you, what reward do you have? Do not even the tax-collectors do the same?

Matthew 5:46 KJV 2000
For if you love them who love you, what reward have you? do not even the tax collectors the same?

Interlinear KJV

For /gar/ if /ean/ ye love /agapao/ them which /ho/ love /agapao/ you, /humas/ what /tis/ reward /misthos/ have ye /echo/? do /poieo/ not /ouchi/ even /kai/ the publicans /telones/ the same /autos/?

Albert Barnes’ Commentary

Verse 46. What reward have ye?, The word reward seems to be used in the sense of deserving of praise, or reward. If you only love those that love you, you are selfish, you are not disinterested; it is not genuine love for the character, but love for the benefit; and you deserve no commendation. The very publicans would do the same.

The Publicans, The publicans were tax-gatherers. Judea was a province of the Roman empire. The Jews bore this foreign yoke with great impatience, and paid their taxes with great reluctance. It happened, therefore, that those who were appointed to collect taxes were objects of great detestation. They were, beside, men who would be supposed to execute their office at all hazards; men who were willing to engage in an odious and hated employment; men often of abandoned characters, oppressive in their exactions, and dissolute in their lives. By the Jews they were associated in character with thieves, and adulterers, and those who were profane and dissolute. Christ says that even these wretched men would love their benefactors.