What are the pros and cons creating a subsidiary out of a division?
Can this be used as an anti-takeover defence?

The main reason for creating a subsidiary is to highlight the real value of a division that would otherwise be overlooked within the parent company. This gives the division managers a greater sense of responsibility and, where applicable, a greater personal financial interest in the division's performances (via ESOPs, stock options, stock that will ultimately be bought back by the parent company, unless the spun off entity is floated, and so on). So this is a way of more precisely monitoring management of the division and motivating its employees.
Another advantage is that outside parties can be brought in as equity partners. So a spin off is a means of financing, whether the outside investors are brought in through a capital increase (which funds the subsidiary) or via a placement of shares (which funds the parent company). This is also a way of taking on as an equity partner that might be interested in the activities of the new subsidiary but not the parent company. If so, it could be sold shares in the entity or merged with it.
A pure creation of a subsidiary is not an anti-takeover defence, but it can be if equity partners are brought in, if the subsidiary is large enough relative to the parent company and if the outside investors have negotiated a call option for the parent company's (majority) holding in the subsidiary, in the event of a change in control at the parent company. Such a defence would have to be set up in advance and not the day before a takeover bid is made!!

However, there are some drawbacks: