Bottom Line Up Front: Yes, it is perfectly legal for a lender to deny credit to any applicant for any reason other than those recognized as protected such as race, gender, etc. You have no “right” to credit, it is a privilege.
The 763 score to which you referred from Credit Karma is not a FICO score, rather it is a Vantage score. However, that point is somewhat moot since it was not cited as a reason behind denial.
Perhaps you could elevate the issue beyond the CSR or contact them again and speak to a different CSR. I would think your issue, as described, would not be entirely unique. But I’ve certainly been proven wrong before.
Good luck if you try again and thank you for sharing. Being denied always stings and I’m sure everyone here has experienced that, so we are with you!