Monster proficiency and player proficiency are similar
Monster manual page 8: Profiency bonus by challenge rating.
- Goblin has +2 based on its CR (1/4) just as a PC will have a proficiency based on character level: +2 at level 1-4, +3 at level 5-8, etc. (PHB p. 15).
Goblin Dexterity of 14 gives it a bonus of +2 based on the weapons
it uses, and is proficient with
That is how the +4 to attack is arrived at:
Scimitar has the finesse property: thus the 14 Dex (+2) of goblin is added to the to-hit for the Goblin (CR 1/4 proficiency bonus (+2))
Attack action for scimitar already includes both +2's for a +4.
Likewise with the short bow attack.
Don't keep adding +2's as it's already been done for you in the MM under the entry for the attacks specified for a monster.
Caution: For some skills, like the Goblin's stealth, the proficiency bonus is added twice to reflect expertise. That is why the Goblin's Stealth is +6 rather than +4. (See the entry in the PHB on expertise, Rogue player class, for this template).
Another example is the Aboleth(MM. P. 12):
CR 10 = Prof Bonus of +4.
That is why History is +12 (+4 twice for proficiency) and Perception is +10 (+4 twice for proficiency); these are added to the stat bonuses of +4 Int (History) and +2 Wis (Perception) respectively.