They did that for prison, poor house, and millitary food because they were "preparing" them enmass, but outside of those people would trap lobsters and prepare them "the right way". It was considered a poverty food because:

* They're essentially aquatic bugs.
* They were incredibly easy to catch at the time.

To keep from letting on how poor they were some people would bury the shells at night so they wouldn't be seen in the trash.