Why would it not be optimal?
Higher gain means you don’t have to use as much transmit power, depending on the antenna you also avoid some issues with noise.
Also, in the 5.8 GHz range it allows you to have a higher overall EIRP legally.
Cost is a factor, but so would having spares for a single link that is unique in your network.
If you are only going like 2 miles, ya, 30 dB is kinda overkill, but if you are going 9.9 miles, I would say the extra cost means you have more flexibility in the future. Mind describing the link a bit?