While it is certainly true that bacteria can secrete some pyrogens, the primary player in the "usual" fever due to infection is Interleukin-1. This is secreted from white cells in response to fighting bacteria. Numerous studies have shown that white cells move faster and are able to "eat" bacteria better under fever temperatures.
A short article on the physiology of fever is in the link below, there is a PDF file with the full text of the article for free if anyone is interested.
http://physiologyonline.physiology.org/cgi/content/abstract/1/1/25