system
Given the following post, respond as if you're commenting on Reddit:
human
[WH40K] We have all this ridiculous technology, why do most our battles take place at close or even melee range?

Gears of War is another such universe. All these ridiculous technologies and capabilities yet the main line of troops still have weapons with chainsaws and bayonets on them. I'd always imagined we be vaporizing our enemies from miles away in the far future, not engaging from less than 100 feet away.
gpt
In the 40k universe, its all about praising the emperor and meeting your enemies head on. Glassing a planet is a last resort kind of thing, and the cities in 40k are packed so densely that it be simple impossible to engage in a long range battle most of the time. Combine that with the factor that pretty much every water drain and holo-vid shop is sanctified in the name of Teh Emprah and they just can justify destroying everything in sight.

In real-world tactics, close range is what you will often find yourself in as well when fighting in a city environment anyway so i guess its also more for practical reasons so that a more thorough clean up can be made over long range combat. Dont forget that long range assault is also used, planetary or ground wise, often to soften up a target before reaching it and going in close.