DDG may contribute to free software projects, but their code is proprietary.
They get away with it because the search is being run by a service on THEIR
computers and yours. The code that runs on your computer their JavaScript
which I am not sure is under a FLOSS license.
Looking at the source code for the home page, the
"duckduckgo-duckduckgo+sprintf+gettext+locale-simple.20130508.082254.js"
doesn't have a license defined but does include GPLv2 code which then makes
the whole .js file GPL due to how the license works.
Their "d968.js" file doesn't include a license and I assume is not free
software.