You might write a DLL if your main product is a library of functions rather than an executable; you would ship a library and a bunch of header files, then people would link your library with their executable.

Another use of DLLs is to reduce executable sizes; if you have a number of executables that share the same group of functions then you can put those functions in a DLL instead of duplicating them across all the executables.

Yes, you could put data in a DLL, but it seems an odd way of doing data storage. This is probably one of those things that you do if you know that you need to do it that way and that that is the only way to achieve what you want to do, so if your question is "why would I want to store data in a DLL" then the answer is most likely "you don't".