Seems they did it a couple of ways.
For me, being the cables were already at the rear transom area next to the batteries, I mounted the 50 amp breaker on the transom. Connected a short 2 gauge positive feed to the breaker and the other side with the cable running forward. Ground cable direct to ground battery terminal. I installed the solenoid under the deck inside the anchor locker where I could get to it and connected the cables to it. Then the wiring to the windlass from the solenoid. I ran the switch wires to the helm and installed the switch. Pretty easy install.
I have since, over this winter relocated my house batteries under the mid berth area behind the panel to get some weight shifted forward. So I pulled the cables forward for the windlass and also the breaker and put them to the house batteries. This is a much shorter run now to the windlass, but I wasn't having any issues before with the longer run as long as I started motors before running the windlass which was highly recommended by Lewmar.
I have the Yamaha aux. charging wires running to the 2 house batteries to keep them charged up. I did use the AGM batteries being the location they are so I would minimize any fumes/acid issues from a typical wet cell.
This battery move helped me as I put her on the local lake this weekend for a test and I can now see my scuppers 1/2 way above the water line now and they were below with all 4 batteries in the transom.
I am telling you all of this to consider batteries, connections, weight, etc. I started with 2 group 24 batteries when I purchased, then went to 3 batteries, then to 4, then to 2 AGM's and then relocation. A lot of work changing stuff around, but so far, always an improvement. Hope this helps.....