I suppose you are talking about foreign key constraints enforced by the database. You probably already are using foreign keys, you just havent told the database about it.
Suppose a programmer is actually doing
this in the right manner already, then
do we really need the concept of
foreign keys?
Theoretically no, However there have never been a piece of software without bugs.
Bugs in application code are typically not that dangerous - you identify the bug and fix it, and after that the app runs smoothly again. But if a bug allows currupt data to enter the database, then you are stuck with it! Its very hard to recover from corrupt data in the DB,
Consider if a subtle bug in FugBugz allowed a corrupt foreign key to be written in the DB. It might be easy to fix the bug and quickly push the fix to customers in a bugfix release. However, how should the corrupt data in dozens of databases be fixed? Correct code might now suddenly break because the assumptions about the integrity of foreign keys dont hold anymore.
In web applications you typically only have one program speaking to the database, so there is only one place where bugs can corrupt the data. In a enterprise application there might be several independant applications speaking to the same database (not to mention people working directly with the db shell). There is no way to be sure that all applications follow the same assumptions without bugs, always and forever.
If constraints are encodede in the database, then the worst than can happen with bugs is that the user is shown an ugly error message about some sql constraint not satisfied. This is much prefereable to letting currupt data into your enterprise database, where it in turn will break all your applications or just lead to all kinds of wrong or misleading output.
Oh, and foreign key constraints also improves performance because they are indexed by default. I cant think of any reason not to use foreign key constraints.