First and foremost, it’s important to note that DNA Testing is not necessary to build a Family Tree. Far from it. There are quite literally hundreds of thousands of documents and records just waiting for your eyes to hit them. In fact, to be accurate with your Family Tree, anything you find via DNA testing should be backed up with records, or if records don’t exist, then some kind of knowledge to back it up. Obviously, this might not always be possible for some closed adoptions or illegitimacy if all involved have passed, but you should have as much evidence to back your claim as possible.
People have some valid concerns about taking a DNA Test. I would encourage everyone that is interested or considering taking one to look into it first, and evaluate your level of paranoia vs what some of the different companies do. Personally, I would have a test done with a company that, upon request, will allow you to download, keep and remove from their system your test results if you’re so inclined.
Some have concerns about potentially helping convict family members if they have committed a violent offense. The most popular case of that happening was in the Bay Area of California where Police used a public DNA database (GED Match) to make a match for a cold case Serial Killer (Golden State Killer). They got hits from some of his family, they were willing to help, and they got him. Again, this was a public database, somewhere that you take your DNA data and upload it to work with other people to try and find/make more matches.
More recently Family Tree DNA changed their terms and conditions about allowing law enforcement to use their site. People were understandably upset and were unsure the extent of access, thinking that the company gave cops a key to all the DNA to free search… this is not the case. That would be a terrible thing for a company to do, and would pretty much kill them off. But they did state that law enforcement may create a profile on the site, just like any user, and upload DNA from a suspect, and then use it to gather any publicly available matches. Likewise, users of the site could opt out of these profiles showing up in Law Enforcement searches if they wish.
Any law agency with probable cause (typically regardless of country too) can provide a warrant for data if they have a sufficient amount of evidence and can state what they want. Coming down to all that, then you better not leave your house, use the internet, throw anything in the rubbish, or spit your gum out anywhere, etc… because if they want it, they can get it.
For me, it leads to common sense, and keeping a fair degree of privacy when dealing with people that are still alive.