Different people have objected to philosophy at different times.
The Persian theologist Al Ghazali in the 11th~12th century wrote at treatise called "The incoherence of the philosophers". In it he showed that philosophers' attempts to prove God's existence with logic failed. Since he wasn't willing to give up religion, he attacked philosophy instead. His main objection was therefore religious.
In the early 20th century (as mentioned in the comments), the logical positivists objected to philosophy coming from the opposite direction.
Their position was that the only meaningful statements that could be made were logical propositions and empirical facts about that world. Any statement that either couldn't be verified experimentally or did not correspond to a logical/mathematical statement was for them meaningless. From this they concluded that statements about ethics, morals, religion, arts, etc... were all meaningless.
They didn't reject philosophy completely, but instead relegated it to being nothing more that a tool for the clarification and analysis of scientific statements. Their objection wasn't to philosophy as a whole, but to metaphysics, which up until then was considered a major sub-discipline of philosophy.
More recently several notable physicists, including Neil DeGrasse Tyson, Stephen Hawking, and Lawrence Krauss, have made statements as to philosophy being useless or obsolete. Their main statement is that natural sciences have matured to the point were all of the big questions (the origin of life, the creation of the universe, etc...) can be answered by science. Philosophy used to be helpful in guiding the natural sciences by giving direction and pointing to what questions we should be asking, but now the natural sciences no longer need it. They support their argument by pointing towards the fact that philosophy no longer influences physics the way it used to in the 17th and 18th centuries, and that most scientists can have successful careers without ever opening a single philosophy book or journal. Lawrence Krauss has a more detailed version of this position (which is really just a dumbed down version of the logical positivist stance called scientism), that science is the only source of objective truth and the scientific method is the only valid epistemic method.
Those who object to these viewpoints do so for the following reasons:
- They do not agree that ethics, morality and aesthetics are meaningless. Questions of value and judgment can never be resolved by science, and the only other option is philosophy. See for example this talk by Hilary Putnam on the collapse of the fact/value dichotomy.
- Philosophy of mind and the study of consciousness can still contribute greatly to science. See for example this debate on the topic involving Krauss, Daniel Dennett, and Massimo Pigliucci.