Marketing looks at all the factors like sales, manufacturing, distribution, building, recruitment, lawyers and the rest, and then fits the marketing of ideas into what the firm is capable of. In an extreme example you don't develop a new flavour of breakfast cereal if you run a car factory Although British Rail did patent a nuclear powered flying saucer.
I once had the definition of marketing as; The marketing department looks at all aspects of the business and decides the price to sell the product at. The sales department then goes out and sells it through advertising, PR and other means.