What does Matthew 6:2 mean?

Matthew 6:2 KJV
Therefore when thou doest [thine] alms, do not sound a trumpet before thee, as the hypocrites do in the synagogues and in the streets, that they may have glory of men. Verily I say unto you, They have their reward.

Matthew 6:2 MKJV
Therefore when you do [your] merciful deeds, do not sound a trumpet before you, as the hypocrites do in the synagogues and in the streets, so that they may have glory from men. Truly I say to you, They have their reward.

Matthew 6:2 NKJV
“Therefore, when you do a charitable deed, do not sound a trumpet before you as the hypocrites do in the synagogues and in the streets, that they may have glory from men. Assuredly, I say to you, they have their reward.

Matthew 6:2 KJV 2000
Therefore when you give your alms, do not sound a trumpet before you, as the hypocrites do in the synagogues and in the streets, that they may have glory of men. Verily I say unto you, They have their reward.

Interlinear KJV

Therefore /oun/ when /hotan/ thou doest /poieo/ thine alms, /eleemosune/ do /salpizo/ not /me/ sound a trumpet /salpizo/ before /emprosthen/ thee, /sou/ as /hosper/ the hypocrites /hupokrites/ do /poieo/ in /en/ the synagogues /sunagoge/ and /kai/ in /en/ the streets, /rhume/ that /hopos/ they may have glory /doxazo/ of /hupo/ men. /anthropos/ Verily /amen/ I say /lego/ unto you, /humin/ They have /apecho/ their /autos/ reward. /misthos/ {do not…: or, cause not a trumpet to be sounded}

Albert Barnes’ Commentary

Verse 2. Do not sound a trumpet before thee, as the hypocrites do. The word hypocrite is taken from stage-players, who act the part of others, or speak not their own sentiments, but the sentiments of others. It means here, and in the New Testament generally, those who dissemble or hide their real sentiments, and assume or express other feelings than their own; those who, for purposes of ostentation, or gain, or applause, put on the appearance of religion. It is probable that such persons, when they were about to bestow alms, caused a trumpet to be sounded, professedly to call the poor together to receive it, but really to call the people to attend to it, or perhaps it may mean that they should not make a great noise about it, like sounding a trumpet.

In the synagogues. The word synagogue commonly means the place of assembling for religious worship known by that name. See Barnes “Mt 4:23”.

It might mean, however, any collection of people for any purpose. And it is not improbable that it has that meaning here. It does not appear that they made a noise in bestowing charity in the synagogues, or that it was commonly bestowed there; but it was probably done on occasion of any great assemblage, in any place of concourse, and at the corners of the streets, where it could be seen by many.

They have their reward. That is, they obtain the applause they seek, the reputation of being charitable; and as this applause was all they wished, there is of course no further reward to be looked for or obtained.

{1} “sound a trumpet” or, “cause a trumpet to be sounded”