The best way to combine the two sentences while keeping the original intent is:
Libraries are often seen as unnecessary; however, they should be valued for the many necessary services they provide to the community.
This choice effectively contrasts the perception of libraries with their actual value, maintaining the original intent of the sentences.