You can hover over various parts of the factory icon to see what it's able to sell (and more importantly, how much it CAN'T sell), what it's paying for its inputs versus what it's getting for its product, and how many craftsmen are employed there compared to clerks. Having a factory with 500 clerks and 200 craftsmen isn't going to be very profitable. If the price and availability of machine parts or some other input is problematical, then it may lose money. If it can't access one input due to low national rank, and can't produce its outputs profitably as a result, then it can't afford its other inputs. Unless you check to see where it's losing that money, and why, there's not much we can tell you. Once you look, and if you can recognize the problem, you probably won't need to ask here unless you don't know how to solve it.