I think the key word here is MAX fuse size for wire , which is 15 amp for 14 ga , 20 amp for 12 , 30 for 10 , 40 for 8 , 50 for 6 ...
But in small pv system the amps are coming to the battery , if they are coming from the battery if you have a short or a bat melt down a smaller than wire max fuse will protect the wire too , and protect the controller,
There are two numbers on a pv panel , working current and short circuit current For a fuse before the controller you go 25% more than the short circuit number , but is not needed in small pv systems less than 3 panels
The controller should be rated at 25% more than the combined working current of the panels
The flow of amps to the battery might be less in amps than the wire size max rated amps in a system because of line voltage drop
I size the fuse next to the battery to allow the amps to pass to the bat but go as low as I can to protect the pv system for bat problems or short at battery
Every system is diffrent , but if you have a long run to the bat and are using # 8 wire for line volt drop and have a pv panel that puts out 5 amps I personaly would not use a 40 amp fuse, it will work