I think its (usually) a bad idea in that its very hard to outdo the original. Often times games don't quite nail what makes the original work and changes to the formula usually aren't consequential enough to matter. Sometimes its great for a stagnant or platform locked genre though.
I consider a game a 'rip-off' if it blindly follows mechanics or the art style in an attempt to get the player to buy in thinking its whatever game its trying to copy. That is you're not trying to sell it based on what it does differently or the game itself, but merely piggybacking another game's design and marketing.
Games that are inspired by other games, even if they are pretty similar, are totally OK. (Stardew Valley or Lords of the Fallen for example)