There are different versions of D&D. At least in some versions, you have some control over assigning some of the stats, and so you could assign some of them as you wish if you want better bonuses for magic.
It shouldn't limit you from using magic, and it doesn't, and that is good.
But, sometimes you will want to do things other than just casting spells (especially if you have run out of spells or if there is anti-magic preventing casting spells), so you can decide if you want to be good at one thing, or good at other things too but perhaps not as much.