If the beam is not load bearing, then you can drill away typically. You really should ask on a local builders site rather than an AV forum, but in the installations that I've done about the only thing I avoid is load bearing beams. Since the load bearing beams often are under joists, or have a bit of a gap around them, this is not typically a serious issue. I know, in my basement, I will actually be building soffits in certain areas just so I can have cabling withing them and to get around beams and to provide retro access.
I have a good 100 or so cables run throughout my home. So, there are plenty of reasons why people may want them. Audio/Video distribution over point-to-point category cabling is one of those reasons. I bring network to my TV, control for my TV, and video to my TV - those are 3 separate cables to just one television. Oh, and my Wii sensor bar is using a control cable as well, which is (you guessed it) cat-5. Then the fireplace uses one, the small rack has half a dozen components in it along with network. I have TVs on other floors which have similar video and control run to them. All the shades are getting power over category cabling to them. All my keypads (a dozen or so) are connected via category cabling.... My doorbell. My door locks. Control for my projector lift. Control for the screen.
Then I have spare cabling run for future use.
40 seems like nothing IMO, and while I don't have a great answer, I do know that is the load bearing beam which is the real no-no. But, I would be asking on local building sites if at all possible and even reach out to a local electrician directly if you can. Or even a building inspector.