In reality we have astonishingly accurate smart weapons. it's hard enough to make sense of Star Wars without all that extra and often conflicting information. NOTE: For this answer I am only using on-screen canon. The reasons are: regenerative shielding, slow 'lasers', and awful targeting computers. Yes, Star Wars has more to do with 19th century naval combat than 21st century.
In the 18th century, such range was necessary due to a lack of accuracy. Within the Star Wars universe, capital ships typically engage each other at what I consider to be unnecessarily close range reminiscent of the broadside battles of 18th century warships.