It's not only not wrong, it's encouraged in the DMG and the MM
The Dungeon Masters Guide (DMG; pp. 273-282) has a set of guidelines for making your own monsters. This is alluded to in the Monster Manual (MM; p. 6) in the green box entitled "Modifying Creatures." Your problem with the longbow bearing orcs was their to hit bonus, not the fact that they were using long bows.
... fighting a bunch of tribal orcs. At one point the orcs drew longbows (with what was at least a +6 to hit as the DM was asking if 25 AC hits). At this, everyone at the table got upset as, according to them, “the monster manual orcs use javelins 30/120 and occasionally chuck spears 20/60; and have a +5 to hit but only with melee weapons.”
This looks like a CR adjustment issue. Per the DMG tools, +6 to attack (proficiency bonus + ability score) is what a CR 3 creature gets(+2 and +4), but the damage per round still points toward CR 1/2 (6-8). Normal orcs are CR 1/2. (DMG; Monster Statistics by Challenge Rating; p. 274).
The usual orc dexterity stat (12 Dex) provides a +1 bonus, not a +4 bonus(Dex 18-19). When added to the CR 1/2's +2 proficiency bonus an orc gets +3 to attack bonus (total) with a long bow. The +6 to hit was a significant difference in chances to hit for the orcs. The DMG points to a CR of 1 since the attack bonus is more than 2 greater than the basic monster. That moves the orcs' CR from 1/2 to 1: not due to the longbows, but due to to hit bonus.
A nice illustration of how to make a mod within the base CR is given here by Aguinaldo Silvestre
Use the DMG tools provided for encounters and customizing monsters
If the longbow bearing orcs were confronting a party of level 2 adventurers, and they were sporting a +6 to hit, the encounter might have been a bit over the party's head.
From Encounter design (DMG p. 82) we get:
4 CR 1 orcs X 2 for size of monster party = 1600 XP (4 x 200 x 2).
With normal orc to hit CR remains 1/2: we'd have 800 XP (4 x 100 x
A deadly encounter for four level 2 PC's is 800 XP, so it should
have been tough but doable.
The 1600 is deadly and more for that level 2 party.
For a party of 4 3rd-level adventurers, the Deadly encounter budget
is 1600 XP.
Make whatever monsters you want to, and modify existing monsters as suits your taste ...
One rule overrides all others: the DM is the final authority on how the rules work in play (XGtE, p. 5)(thanks to @SeraphsWrath for the note).
... but check your modifications against the monster creation / customization material in the DMG. This will give you an idea of how much challenge a custom monster will offer to your players. It's not an exact measure, but it should get you in the ballpark.
As Trish suggested, playtest it.
In my brother's campaign, our party of 5 ran into 8 orcs armed with the usual great axes and also with long bows. (Three snipers in the trees!) We were mixed levels, 2 and 3. That was a tough fight, but we were not at extreme range
(less than 100' to start) and they closed distance in a hurry (aggressive) as the fight progressed. We found that the great axes were a much more serious problem than the long bows -- but the orcs were not +6 to hit with bows.
@Crovaxon made a useful suggestion in a comment on using ability checks to complement monster customization.
If the players know the lore of the world you play in and/or know the
monster manual itself, they might come into the game with certain
expectations. But modifying the monster is still fine and a fun way to
encounter new stuff! Just inform your players beforehand that you
might modify the enemies they will encounter. Keep in mind what the
Monster Manual gives you in terms of lore for the creatures you
modify. If your modifications touch upon these, encourage your players
to make Knowledge Rolls and incorporate your mods into your answer.