This is of those things BF4 did better in my opinion. Some weapons were limited to classes (f.e. sniper rifles for scouts), but there were lots of guns that were available to all classes.
Two examples of why this bothers me:
1. I like to play medic, but I'm not good with the semi-auto rifles. The only viable medic rifle for me is the Fedorov, which is a nice gun but it gets boring. I don't get it either, why would a medic get medium-range weapons only, when they can only be effective in the middle of all the action? You can't heal people from 100m away.
2. People pick assault because they have a nice gun selection. So you often see 20 assaults running on a map without any vehicles. Sure you can throw anti-tank nades at infantry as well, but I'm sure many would pick a more useful role if they had a more interesting gun selection.
In BF4 you could play recon (spot, place beacons etc) and still use f.e. a shotgun. In a way, making some weapons available to all classes might even make scouts play a more offensive role, which is something a lot of people are bothered by as well.
To be clear, I'm not saying all guns should be available to all classes. Just take some guns and put them in the "free for all classes" pool.