Washington State has been doing something similar for a number of years. It's based on their belief they lose tax revenue because people lie about what they paid for the vehicle. We could get into a long and maybe contentious discussion about how that may be true or not, but then if taxes make a transaction too expensive, folks will just stop doing taxable events altogether. There's got to be a balance. As for where they get the data to support their numbers, our state says it's from a variety of sources: auction results (eek!), and publications such as NADA, Kelly, Old Cars, etc. On the trade thing it takes a notarized affidavit (form supplied by state) from both parties to avoid tax, or minimize it for a cash payment difference in value. Sounds like either you didn't have the right documentation or got an arbitrary/uninformed clerk if Texas has similar program. Hopefully pursuing your rep will get that righted.
I've only had the stated price challenged once by a clerk using the database value versus my Bill of Sale value. She told me I could take it to a state authorized inspection shop and have them validate my contention that since it was all in pieces it had lower value than her guide denoted. Since the additional tax only amounted to around $20 bux I just paid it. It would have taken me more time and effort to load the stuff up and haul it around than that. Of course, when the market drops like it has in the last couple years, their value guides get wayyyy out of whack, but that's not to their money grubbing advantage. It will be interesting to see how that plays out.