Leaving the vine attached to the tomato is a marketing gimmick and does not have any impact on the flavour of the tomato. However, the on-the-vine tomatoes you find on supermarket shelves are often a different variety to the bog standard cheap loose ones.
The combination of improved flavour and a more natural look mean that consumers are prepared to pay a premium for on-the-vine tomatoes, even if production costs are more or less the same.